[7059] in Perl-Users-Digest
Perl-Users Digest, Issue: 684 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 30 05:07:20 1997
Date: Mon, 30 Jun 97 02:00:28 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 30 Jun 1997 Volume: 8 Number: 684
Today's topics:
Re: [Q]: Passing arrays by reference to prototyped func (Tim Gim Yee)
Re: Bad Filenames (Tad McClellan)
Buffering problem?? (o-su ken'ichi )
Re: CGI.PM or cgi-lib.pl? and strange errors? <guitarweb@hotmail.com>
changing caller's cwd <damon@pobox.com>
Re: I just dont't get this -- opening a new filehandle (Terje Bless)
Lowest INTERNATIONAL Calling RATES Available !! <remove@freemail.nll>
New: Word Utility Elser (Martin Schwartz)
NT version of Mirror? <d.giaretta@rl.ac.uk>
ODBC @@identity problem <folscheid_b@istvax.ist.lu>
Pattern matching question <pnibbs@icd.com.au>
Perl 5.003 setuid -- please! Steve.Blackmon@SciAtl.COM
Re: Perl interface to IRC? <rra@stanford.edu>
PERL Module question <perrella@ehsn7.cen.uiuc.edu>
Perl, PostgresQL, CGI <michaely@pcm.com.au>
Re: Perl, PostgresQL, CGI <wayne@cta-challenge.com.au>
PGP or any-other crypt interface module for Perl? (Subbu Meiyappan)
Re: PGP or any-other crypt interface module for Perl? <wayne@cta-challenge.com.au>
socket buffering problem? (o-su ken'ichi )
testing newsgroups ignore <perrella@ehsn7.cen.uiuc.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 30 Jun 1997 05:10:35 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: [Q]: Passing arrays by reference to prototyped functions
Message-Id: <33b73eed.182776278@news.oz.net>
On Sun, 29 Jun 1997 18:59:35 GMT, "David W. Coppit"
<dwc3q@mamba.cs.Virginia.EDU> wrote:
>
>I get the message "Bizarre copy of ARRAY in aassign" when I try to do the
>following:
>
>sub foo(\@$@) {
> my @copy = @{(shift)};
> my $scalarvar = shift;
> my @optional = @_;
>
>...
>}
>
>foo (@array1,0,@array2);
>
>I'm trying to make the third argument optional. If I change it to a
>reference and treat it like the first argument, everything is okay, but it
>seems to me that this shouldn't be necessary. Am I missing something?
I see &foo asking for arguments that look like (reference to an array,
scalar, array). But your giving it (array, scalar, array). Maybe...
foo (\@array1, 0, @array2);
So it's the first argument that's giving you trouble, not the third.
-- Tim Gim Yee tgy@chocobo.org
http://www.dragonfire.net/~tgy/moogle.html
"Will hack perl for a moogle stuffy, kupo!"
------------------------------
Date: Sun, 29 Jun 1997 22:52:20 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Bad Filenames
Message-Id: <kha7p5.f51.ln@localhost>
Justin Henry (jch11@airmail.net) wrote:
: Ok, I've been looking at this all day and I am stumped. Maybe some of you
: more advanced Perleese can see what I'm overlooking. I have this script
: that opens a text file which is a listing of C header files, one per line
: (example.h) I then have the Filehandle HEADERS that is supposed to open the
: file and search for structs (which are data structures in case ya don't use
: c). ANYway... I can't get this script to open the header files by using
: $list_line. Everything else works ok ( I know it's not complete). Thanks
: for any help you cna give. Here it is
: #! /usr/....
: $textfile="gahead.txt"; # the text file containing the
: list of header files
: $pagename="QueueList.c"; # the program I end up writing to (not
: important yet)
: open(LIST,"textfile") || die $!;
^^^^^^^^^^
You really wanted to access the $textfile variable there, right?
open(LIST,$textfile) || die $!;
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 30 Jun 1997 06:47:31 GMT
From: t95129ku@sfc.keio.ac.jp (o-su ken'ichi )
Subject: Buffering problem??
Message-Id: <5p7kq3$40c$2@news.sfc.keio.ac.jp>
Hiya all, good afternoon from Tokyo.:-)
I'm coding the server which seems relatevely simple.
*but*
I have big headaches about the trouble which is,i think, the buffering
problem. For some reasons, if-clause doesn't evaluate the condition. I
can't get why. To explain the current problem as simple as possible ,
please execute this code. I tried the best to explain what seems
wrong.
NOTE: I use the k-term as a client, so type
% telnet HOSTNAME 20000
Thank you very very much in advance!
NAME: Ken'ichi Unnai E-mail: t95129ku@sfc.keio.ac.jp
######### CODE ###########
#! /usr/local/bin/perl -w
use strict;
use Socket;
my($port) = 20000;
my($tcpProtocolNumber) = getprotobyname('tcp') || 6;
my($connection,$addr,$child,$af,$clientPort,$internetAddr,$hostname);
$SIG{'INT'}='closeSocket';
select(NEWSOCKET);$|=1;select(STDOUT);
socket(SOCKET,AF_INET(),SOCK_STREAM(),$tcpProtocolNumber)
or die("socket: $!"); ##### socket
print "Port = $port\n";
my($internetPackedAddress) = pack('Sna4x8',AF_INET(),$port,"\0\0\0\0");
bind(SOCKET,$internetPackedAddress)
or die("bind: $!"); #### bind
listen(SOCKET,5) || die("listen: $!"); #### listen
select(SOCKET);$|=1;select(STDOUT);
for ($connection = 1; ;$connection++){
printf("listening for connection %d........\n",$connection);
$addr = accept(NEWSOCKET,SOCKET) || die("accept: $!"); # accept
if(($child = fork())==0){
print "accept ok\n";
($af,$clientPort,$internetAddr) = unpack('Sna4x8',$addr);
$hostname = gethostbyaddr($internetAddr,AF_INET);
print "$connection: port=$clientPort,From : $hostname\n";
&mainProg; # here comes funcion call.
close(NEWSOCKET);
exit;
}
close(NEWSOCKET);
}
sub mainProg{
my(@list) = &sort_by_user_and_doc;
print "qualified is @list\n";
}
sub sort_by_user_and_doc{
my(@array) = ("ken/myDoc/1","ken/myDoc/2");
my($inputName,$inputDocName,@eachParam,
$userName,$docName,$num,@sorted_by_userName,
@sorted_by_docName,$tmp,@qualified);
print NEWSOCKET "userName?(type ken) : "; # input userName
chop($inputName = <NEWSOCKET>);
print STDOUT "inputName is $inputName\n";
print NEWSOCKET "docName?(type myDoc) : "; # input docName
chop($inputDocName = <NEWSOCKET>); #
print "inputDocName is $inputDocName\n";
print "user_and_docName is @array\n";
######## this loop sorts by userName,docName, and makes @qualified.
######## BUFFERING TRABLE SEEMS TO HAPPENED in this foreach loop.
foreach(@array){
@eachParam = ($userName,$docName,$num) = split(/\//);
print "if($userName eq $inputName)\n";# for debugging
if($userName eq $inputName)
{
print "inside of if-clause of inputName\n"; # for debugging
shift(@eachParam);
@sorted_by_userName = @eachParam;
}
print "if($docName eq $inputDocName)\n";# for debugging
if($docName eq $inputDocName)
{
print "inside of if-clause of inputDocName\n";# for dubugging
shift(@sorted_by_userName);
@sorted_by_docName = @sorted_by_userName;
$tmp= join("/",@sorted_by_docName);
push(@qualified,$tmp);
}
}
return @qualified;
}
sub closeSocket{
close(NEWSOCKET);
die("Socket closed due to SIGINT.\n");
}
------------------------------
Date: Sun, 29 Jun 1997 19:28:05 -0700
From: perl perl perl <guitarweb@hotmail.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: CGI.PM or cgi-lib.pl? and strange errors?
Message-Id: <33B719B5.1F85@hotmail.com>
Tom Phoenix wrote:
>
> On Sun, 29 Jun 1997, perl perl perl wrote:
>
> > i know i need to read up on this,
>
> Are you saying that you know that somebody has already written what you
> want to read, but you want us to write it here so you can read this
> instead? :-)
no. actually not. (i don't make much sense at 5 Am). i was meaning and
saying, that i knwo there must be what i want (information-wise) out
there. but i don't know where to look for what i need to know., seeign
there is a lot, and very little may have to do with what i'm looking
for, with that said, i only made the comment as meaning that i know *i*
need to do this myself, and i *want* to, but (for now), i was only
wondering if it was worth looking into, because of the fact that there
is so much about it that woul be wasting my time for what i need and
want to do (being if it wasn't worth looking into), when i could be
doing something better perhaps or keep it as is.
> > but i have a program running now people are using. i only want to know
> > (as i've heard), that cgi.pm is far better then using the cgi-lib.pl?
>
> If you're asking if you've heard that CGI.pm is better than cgi-lib.pl,
> then yes, I think you have heard that. Would you like to hear it again?
> :-)
ha ha
>
> > if so, does anything need to be changed in my script or otherwise?
>
> Besides what's listed in the CGI.pm docs? Not much...
fair enough answere.
> As for the error messages that you listed, check perldiag(1) for the perl
> messages. For others, see whether they're listed in the docs for your
> server or other utilities you use. If you can't find them anywhere, the
> strings command may be able to help. Good luck!
thanks for the info about the errors, etc. too (or where to look). i do
appreciate all the time you take in answering people's questions. you,
randal, tad and a few others are the people i watch in the newsgroups to
learn from. and you were kind enough to even email as well, most don't.
i know you're busy, so i'll stop ranting. i just wanted to say that you
shouldn't assume i want anyone to do programming for me, or tell me how
everything works. my questions was general. i know many people do expect
and hope people will just "give" them what they are hoping for, but i do
not. so please don't assume i want anyone to do anything or write
anything here. i do look everywhere i know of. i want the satisfaction
of knowing i did it myself. but i do however appreciate your help and
time you take. thanks again, and sorry i took up so much of your time. i
only rant about this, because i see you wasting a lot of your time
typing comments to people that have nothing to do with the subeject. and
well, that concerns me. :o) be well. *l*. really, thanks.
--roy--
*in a sort of concerned parental-ish voice* :-)
> --
> Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 29 Jun 1997 11:45:06 -0700
From: "root@snidget.jumeaux.org" <damon@pobox.com>
Subject: changing caller's cwd
Message-Id: <33B6AD31.26320FC9@pobox.com>
something i've simply never tried to do before and now i find myself
stumped. what's involved in changing the working directory of the shell
that ran perl? i.e., i want my program to take me to a new directory.
(i'm trying to replace an old DOS program called 'go' under linux - i'm
sick of typing 'cd /usr/X11R6/lib/X11/fvwm2' and the like, even *with*
filename completion ;)
the funny thing is, i can't decide whether this is a stupid question
that'll cause me to slap my forehead, or whether there's more involved
than meets the eye...
please reply via email if possible. thanks.
-damon
--
http://pobox.com/~damon/ _/\_ "Hey, you sass those hoopy
damon harper __\ /__ jumeaux? There're two
froods
damon@pobox.com \ / who rully know where their
laur & damon: jumeaux@vcn.bc.ca |/||\| towels are." -- ma
jumelle
------------------------------
Date: Mon, 30 Jun 1997 04:11:39 +0200
From: link@tss.no (Terje Bless)
Subject: Re: I just dont't get this -- opening a new filehandle
Message-Id: <5p74kq$fkp$1@news.uit.no>
In article <8cu3ihcrx0.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
>Please get CGI.pm. Read it. Use it.
LOL.
I think this is one of the reason I love Perl. In which other programming
language does the notion of /reading/ an extension library not strike
relative inepts with a sense of great fear? :-)
--
Party? Party, lord? Yes, lord. Right away, lord.
- Beopunk Cyberwulf
------------------------------
Date: 30 Jun 1997 05:14:48 GMT
From: <remove@freemail.nll>
Subject: Lowest INTERNATIONAL Calling RATES Available !!
Message-Id: <5p7fc8$945$2330@cadmium.aware.nl>
We offer very competitive low international calling rates worldwide, with saving up to 85% !!!
Some examples:
Australia - USA = 0.29 US$/minute
Hong Kong - UK = 0.61 US$/minute
New Zealand - Netherlands = 0.66 US$/minute
Japan - Germany = 0.61 US$/minute
Singapore - USA = 0.35 US$/minute
Sweden- Canada = 0.36 US$/minute
Germany- Dom Rep =0.71 US$/minute
France - Bahamas = 0.60 US$/minute
There are no fees, other than usage !!
If you might be interested in more information on our services and rates to other countries, please visit our website at http://www.angelfire.com/biz/GTconsult or send us a message to GTconsult@freemail.nl and tell us the countries you call now, what you are paying now and which service you use at the moment !!
If you think this is not the appropriate newsgroup to place this advert, please let us know by sending an e-mail to remove@freemail.nl and mention the newsgroup in the subject heading, so that in future we will not advertise in this newsgroup again !!
Regards
Robert
------------------------------
Date: 30 Jun 1997 05:10:37 GMT
From: schwartz@cs.tu-berlin.de (Martin Schwartz)
Subject: New: Word Utility Elser
Message-Id: <5p7f4d$dhm$1@news.cs.tu-berlin.de>
Hello,
Just finished: a new distribution of LAOLA. Laola contains source codes
and information about the so called "structured storage" format, that is
the binary format of OLE documents.
It can be found at:
http://www.cs.tu-berlin.de/~schwartz/pmh/laola.html
The most important changes are dealing with Word 6 document format. Laola
now includes a very first approach of a publically specification of Word's
binary document format. Further more it includes the new program "Elser".
Elser is dealing heavily with the document format of Word 6, especially:
* decodes Word documents (even most documents with no text at all)
* lists macros and macro codes
* can delete single macros or all macro information
* renames auto executable macros and makes them editable
Unfortunately I didn't make it until now to implement a nice html conversion.
May be you will like to hear anyway, that I improved the program "lhalw" a
little bit. It now can convert "fast saved" word documents to text, also.
Regards,
Martin
--
// Le degre zero de l'ecriture? Zero probleme!
------------------------------
Date: 30 Jun 1997 08:00:25 GMT
From: "Dr David Giaretta" <d.giaretta@rl.ac.uk>
Subject: NT version of Mirror?
Message-Id: <01bc852c$d7618900$4b74f682@ssdnt03>
Anyone got a version of Mirror running on an NT machine??
...David
------------------------------
Date: Mon, 30 Jun 1997 09:05:21 +0200
From: Folscheid Bob <folscheid_b@istvax.ist.lu>
Subject: ODBC @@identity problem
Message-Id: <33B75AB1.1FC0@istvax.ist.lu>
ODBC @@identity problem
Hello,
I am using Perl 32 for NT, and Win32:ODBC
The command
$db->Sql("select @@identity");
after an insert command fails,
what is the problem, has anyone a solution
Bob Folscheid
Email: folscheid_b@istvax.ist.lu
------------------------------
Date: Mon, 30 Jun 1997 16:58:08 +1000
From: P Nibbs <pnibbs@icd.com.au>
Subject: Pattern matching question
Message-Id: <33B75900.719E@icd.com.au>
Hi All,
Just a simple pattern matching question.
I would like to test for IP numbers between a certain range (203.63.0.0
-> 203.63.255.255)
The IP number is held within the variable $ENV{REMOTE_ADDR} and I am
testing for it as follows:
if ($ENV{REMOTE_ADDR} == /203.[0-63].[0-255].[0-255]/){
This isn't working - can anyone please tell me what i am doing wrong?
thanks,
Phil.
--
------------------------------
Date: Sun, 29 Jun 1997 22:42:08 -0600
From: Steve.Blackmon@SciAtl.COM
Subject: Perl 5.003 setuid -- please!
Message-Id: <867641814.13078@dejanews.com>
I have a Perl script that need setuids for root and is
run by an ordinary user. The user provides some information
such as directories to be created, which must be done as
root. I am not concerned with security, but I cannot seem
to find a way to get around Perl checking for tainted data.
Any suggestions as to how I can accomplish this without
finding a non-Perl solution?
Thanks in advance,
Steve Blackmon
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 29 Jun 1997 19:35:40 -0700
From: Russ Allbery <rra@stanford.edu>
To: nneul@umr.edu (Nathan Neulinger)
Subject: Re: Perl interface to IRC?
Message-Id: <m3n2o8x1fn.fsf@windlord.Stanford.EDU>
[ Posted and mailed. ]
Nathan Neulinger <nneul@umr.edu> writes:
> Has anyone developed a perl interface to IRC?
> I'm not talking about running a tool under one of the other IRC
> packages, but a direct interface.
>From the module list:
Net::
::IRC i Internet Relay Chat interface DSHEPP
DSHEPP Doug "Sirilyan" Sheppard <sirilyan@link.ca>
That would probably be a good person to contact, to see how his project is
coming along.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sun, 29 Jun 1997 21:49:59 -0500
From: perrella andrew c <perrella@ehsn7.cen.uiuc.edu>
Subject: PERL Module question
Message-Id: <Pine.SOL.3.95.970629214320.6164A-100000@ehsn7.cen.uiuc.edu>
Hi,
I recently posted a question on another newsgroup (.cgi) about how
to take the contents of a URL on another server and create a scalar
variable with those contents.
It was suggested that I use the win32::internet module. I
downloaded the module, installed it, but something got screwed up. I
figured I would have a better chance of diagnosing the problem if i new
more about the perl modules in general.
I am running perl 5.003 build 306 on windows NT,
My questions are:
Where does a module go in the c:\perl directory?
What does a Module do?
How do I call it?
How is it different from a .pl file which I can call using the
&foo.pl command from within a script?
Any help on these questions, or any direction as to where I can go
to find these answers would be appreciated.
THanks,
Andrew Perrella
perrella@uiuc.edu
------------------------------
Date: Mon, 30 Jun 1997 17:35:08 +1000
From: Michael Yeung <michaely@pcm.com.au>
Subject: Perl, PostgresQL, CGI
Message-Id: <33B761AC.7244F16B@pcm.com.au>
I'm currently working on a databasing project in which I'm designing an
applications interface in HTML. In order to interface with the database
(Postgres), I need to write CGI scripts with embedded SQL., Does anyone
know how this could be done with Perl5?
regards,
MIKE <michaely@pcm.com.au>
------------------------------
Date: Mon, 30 Jun 1997 18:28:55 +1000
From: Wayne Blick <wayne@cta-challenge.com.au>
To: Michael Yeung <michaely@pcm.com.au>
Subject: Re: Perl, PostgresQL, CGI
Message-Id: <33B76E47.6243@cta-challenge.com.au>
Michael Yeung wrote:
>
> I'm currently working on a databasing project in which I'm designing an
> applications interface in HTML. In order to interface with the database
> (Postgres), I need to write CGI scripts with embedded SQL., Does anyone
> know how this could be done with Perl5?
>
> regards,
> MIKE <michaely@pcm.com.au>
Have a look at PHP/FI at http://www.vex.net/php/
Wayne Blick
------------------------------
Date: 30 Jun 1997 04:16:26 GMT
From: smeiyapp@vlsi.com (Subbu Meiyappan)
Subject: PGP or any-other crypt interface module for Perl?
Message-Id: <5p7buq$a8e1@frivolous.sanjose.vlsi.com>
Folks:
Is there a PGP (Pretty Good Privacy) or any-other
encryption interface to Perl, that is already available?
Thanks
Subbu
---
=========================================================================
Subramanian S. Meiyappan Voice: Off: (602) 752 6174
VLSI Technology, Inc.
e-mail: Subbu.Meiyappan@tempe.vlsi.com
=========================================================================
------------------------------
Date: Mon, 30 Jun 1997 18:32:01 +1000
From: Wayne Blick <wayne@cta-challenge.com.au>
To: smeiyapp@vlsi.com
Subject: Re: PGP or any-other crypt interface module for Perl?
Message-Id: <33B76F01.24D8@cta-challenge.com.au>
Subbu Meiyappan wrote:
>
> Folks:
> Is there a PGP (Pretty Good Privacy) or any-other
> encryption interface to Perl, that is already available?
>
> Thanks
> Subbu
>
> ---
> =========================================================================
> Subramanian S. Meiyappan Voice: Off: (602) 752 6174
> VLSI Technology, Inc.
> e-mail: Subbu.Meiyappan@tempe.vlsi.com
> =========================================================================
Yes, have a look on CPAN in the Authentication/Security/Encryption area.
Wayne Blick
------------------------------
Date: 30 Jun 1997 06:29:21 GMT
From: t95129ku@sfc.keio.ac.jp (o-su ken'ichi )
Subject: socket buffering problem?
Message-Id: <5p7jo1$35j$1@news.sfc.keio.ac.jp>
Hiya all, good afternoon from Tokyo.:-)
I'm coding the server which seems relatevely simple.
*but*
I have big headaches about the trouble which is,i think,
the buffering problem. For some reasons, if-clause doesn't
evaluate the condition. To explain the current problem as simple as
possible , please execute this code.
I tried the best to explain what seems wrong.
NOTE: I use the k-term as a client, so type
% telnet HOSTNAME 20000
Thank you very very much in advance!
NAME: Ken'ichi Unnai E-mail: t95129ku@sfc.keio.ac.jp
######### CODE ###########
#! /usr/local/bin/perl -w
use strict;
use Socket;
my($port) = 20000;
my($tcpProtocolNumber) = getprotobyname('tcp') || 6;
my($connection,$addr,$child,$af,$clientPort,$internetAddr,$hostname);
$SIG{'INT'}='closeSocket';
select(NEWSOCKET);$|=1;select(STDOUT);
socket(SOCKET,AF_INET(),SOCK_STREAM(),$tcpProtocolNumber)
or die("socket: $!"); ##### socket
print "Port = $port\n";
my($internetPackedAddress) = pack('Sna4x8',AF_INET(),$port,"\0\0\0\0");
bind(SOCKET,$internetPackedAddress)
or die("bind: $!"); #### bind
listen(SOCKET,5) || die("listen: $!"); #### listen
select(SOCKET);$|=1;select(STDOUT);
for ($connection = 1; ;$connection++){
printf("listening for connection %d........\n",$connection);
$addr = accept(NEWSOCKET,SOCKET) || die("accept: $!"); # accept
if(($child = fork())==0){
print "accept ok\n";
($af,$clientPort,$internetAddr) = unpack('Sna4x8',$addr);
$hostname = gethostbyaddr($internetAddr,AF_INET);
print "$connection: port=$clientPort,From : $hostname\n";
&mainProg; # here comes funcion call.
close(NEWSOCKET);
exit;
}
close(NEWSOCKET);
}
sub mainProg{
my(@list) = &sort_by_user_and_doc;
print "qualified is @list\n";
}
sub sort_by_user_and_doc{
my(@array) = ("ken/myDoc/1","ken/myDoc/2");
my($inputName,$inputDocName,@eachParam,
$userName,$docName,$num,@sorted_by_userName,
@sorted_by_docName,$tmp,@qualified);
print NEWSOCKET "userName?(type ken) : "; # input userName
chop($inputName = <NEWSOCKET>);
print STDOUT "inputName is $inputName\n";
print NEWSOCKET "docName?(type myDoc) : "; # input docName
chop($inputDocName = <NEWSOCKET>); #
print "inputDocName is $inputDocName\n";
print "user_and_docName is @array\n";
######## this loop sorts by userName,docName, and makes @qualified.
######## BUFFERING TRABLE SEEMS TO HAPPENED in this foreach loop.
foreach(@array){
@eachParam = ($userName,$docName,$num) = split(/\//);
print "if($userName eq $inputName)\n";# for debugging
if($userName eq $inputName)
{
print "inside of if-clause of inputName\n"; # for debugging
shift(@eachParam);
@sorted_by_userName = @eachParam;
}
print "if($docName eq $inputDocName)\n";# for debugging
if($docName eq $inputDocName)
{
print "inside of if-clause of inputDocName\n";# for dubugging
shift(@sorted_by_userName);
@sorted_by_docName = @sorted_by_userName;
$tmp= join("/",@sorted_by_docName);
push(@qualified,$tmp);
}
}
return @qualified;
}
sub closeSocket{
close(NEWSOCKET);
die("Socket closed due to SIGINT.\n");
}
------------------------------
Date: Sun, 29 Jun 1997 21:42:47 -0500
From: perrella andrew c <perrella@ehsn7.cen.uiuc.edu>
Subject: testing newsgroups ignore
Message-Id: <Pine.SOL.3.95.970629214225.6140B-100000@ehsn7.cen.uiuc.edu>
test
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 684
*************************************