[17398] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4818 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 6 00:10:30 2000

Date: Sun, 5 Nov 2000 21:10:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973487412-v9-i4818@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 5 Nov 2000     Volume: 9 Number: 4818

Today's topics:
        read > find > run <brian@bdjc.freeserve.co.uk>
    Re: read > find > run <jeff@vpservices.com>
    Re: read > find > run <brondsem@my-deja.com>
    Re: read > find > run <jeff@vpservices.com>
    Re: script: many very similar letters (emails) to many  (Gwyn Judd)
        Splitting variable length fixed records <peter.sundstrom@eds.com>
    Re: Splitting variable length fixed records <wyzelli@yahoo.com>
    Re: Splitting variable length fixed records <peter.sundstrom@eds.com>
        SSI scripts <markscott@barclays.net>
    Re: SSI scripts <jeff@vpservices.com>
    Re: SSI scripts <jeff@vpservices.com>
        Timeout option on CGI script????? <webmaster@kildare-signs.com>
        undocumented fatal error, 5.6, unicode <ter@my-deja.com>
    Re: undocumented fatal error, 5.6, unicode (Martien Verbruggen)
    Re: Using file with procedures (Chris Fedde)
        What am i doing wrong SSI? <markscott@barclays.net>
    Re: What am i doing wrong SSI? <peter.sundstrom@eds.com>
        why can the browser do it but my perl prog. cannot ? <jawanth-and-meena@worldnet.att.net>
    Re: Why would subs not get the right args? (Chris Fedde)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 6 Nov 2000 01:14:15 -0000
From: "Brian Canning" <brian@bdjc.freeserve.co.uk>
Subject: read > find > run
Message-Id: <8u513d$gvo$1@newsg3.svr.pol.co.uk>

Hi all hows it going?

i know i am doing somthing silly here but can't work it out

i what to read in a file and exicute a sub when it find a comment
in the HTM file.
heres the script where am i going wrong?

sub show_form {
 open (formfile, "add.htm") || die print "Oh my god, where is the form file
called add.htm";
 while (<formfile>) {
  if ($_ =~ s/<!--type-->//){
   &create_types;
  }
  elsif ($_ =~ s/<!--music-->//){
   &create_music;
  }
  else {
   print $_;
  }

 }
}





------------------------------

Date: Sun, 05 Nov 2000 17:33:14 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: read > find > run
Message-Id: <3A060A5A.4B564221@vpservices.com>

Brian Canning wrote:
> 
> heres the script where am i going wrong?

There's no way for us to know unless you a) define what "going wrong"
means and b) show us the part of the code where the problem is.

Here are some other comments which don't really explain what is "going
wrong" since the part of the code you have shown is ok syntactically.

> sub show_form {
>  open (formfile, "add.htm") || die print "Oh my god, where is the form file
> called add.htm";

You are not printing $! so that if the file can't be opened you won't
know why.

>  while (<formfile>) {

Filehandles are usually upper-cased for clarity.

>   if ($_ =~ s/<!--type-->//){
>    &create_types;
>   }

The $_ is not needed since that is the default line for the s/// to work
on anyway and you may want to look at /e to see how to execute your
function as part of the substitution.

Do &create_types and &create_music print something?  You call them here,
but do not print their results.

> print $_;

Is that supposed to print to a file?  If yes, then you need the
filehandle of that file in the print statement.  If no and you are
intending the results to go to a browser, did you print a content-type
header first?

-- 
Jeff


------------------------------

Date: Mon, 06 Nov 2000 01:47:05 GMT
From: Dave Brondsema <brondsem@my-deja.com>
Subject: Re: read > find > run
Message-Id: <8u52io$728$1@nnrp1.deja.com>

In article <8u513d$gvo$1@newsg3.svr.pol.co.uk>,
  "Brian Canning" <brian@bdjc.freeserve.co.uk> wrote:
> Hi all hows it going?
>
> i know i am doing somthing silly here but can't work it out
>
> i what to read in a file and exicute a sub when it find a comment
> in the HTM file.
> heres the script where am i going wrong?
>
> sub show_form {
>  open (formfile, "add.htm") || die print "Oh my god, where is the
form file
> called add.htm";
>  while (<formfile>) {
>   if ($_ =~ s/<!--type-->//){

you don't want to substitute anything, use this instead:
$_ =~ /<!--type-->/
or just
/<!--type-->/ (I think)


>    &create_types;
>   }
>   elsif ($_ =~ s/<!--music-->//){
>    &create_music;
>   }
>   else {
>    print $_;
>   }
>
>  }
> }
>
>

--
Dave Brondsema


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Sun, 05 Nov 2000 18:05:42 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: read > find > run
Message-Id: <3A0611F6.E9926568@vpservices.com>

Dave Brondsema wrote:
> 
> In article <8u513d$gvo$1@newsg3.svr.pol.co.uk>,
>   "Brian Canning" <brian@bdjc.freeserve.co.uk> wrote:
> >
> >   if ($_ =~ s/<!--type-->//){
> 
> you don't want to substitute anything, use this instead:
> $_ =~ /<!--type-->/

If he doesn't want to substitute anything *and* he doesn't want to
remove the original comment.

-- 
Jeff


------------------------------

Date: Mon, 06 Nov 2000 04:38:23 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: script: many very similar letters (emails) to many  different recipients
Message-Id: <slrn90cdds.73f.tjla@thislove.dyndns.org>

I was shocked! How could Jan <krupa@mel222.sggw.waw.pl>
say such a terrible thing:
>I need to send automatically many (say 50) very similar
>(but a little bit different) letters (emails) to many
>different recipients.

I suggest that you attempt to write some kind of a script and then post
it. You are likely to get a better response if it doesn't look like you
are begging someone to write it for you.

>Should I use  perl (under (preferably) Linux or Win95/NT) for such job?
>Maybe awk is also good or better?

Who knows. What languages are you familiar with programming in? You
should use them unless you have some pressing need to learn Perl. That
said I'm sure Perl is a perfectly adequate tool for the job you
describe.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
BOFH excuse #428:

Firmware update in the coffee machine


------------------------------

Date: Mon, 6 Nov 2000 16:48:57 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Splitting variable length fixed records
Message-Id: <8u59tb$28h$1@hermes.nz.eds.com>

I have a file of fixed records of variable length (newline terminated), eg:

F1F2..F120

Where

F1 is 120 bytes
F2 up to F120 is 60 bytes.

The minimum number of fields is 2 and max is 120.  What I want to do is to
split each record onto a newline.

I know the following regex doesn't work, but hopefully it shows what I'm
attempting:

s/^(.{120})(.{60})+/\1\n\2\n/;

It will work if I only have 2 fields , but is there anyway to make it work
if there are 3 or more fields?  Is there a better way to approach this
problem?  I looked at unpack, but I couldn't see a way of utilising it for
this situation.




------------------------------

Date: Mon, 6 Nov 2000 14:29:33 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Splitting variable length fixed records
Message-Id: <kQqN5.37$2d7.1841@vic.nntp.telstra.net>

"Peter Sundstrom" <peter.sundstrom@eds.com> wrote in message
news:8u59tb$28h$1@hermes.nz.eds.com...
> I have a file of fixed records of variable length (newline
terminated), eg:
>
> F1F2..F120
>
> Where
>
> F1 is 120 bytes
> F2 up to F120 is 60 bytes.
>
> The minimum number of fields is 2 and max is 120.  What I want to do
is to
> split each record onto a newline.
>
> I know the following regex doesn't work, but hopefully it shows what
I'm
> attempting:
>
> s/^(.{120})(.{60})+/\1\n\2\n/;
>
> It will work if I only have 2 fields , but is there anyway to make it
work
> if there are 3 or more fields?  Is there a better way to approach this
> problem?  I looked at unpack, but I couldn't see a way of utilising it
for
> this situation.
>

Here is something I tried.  No doubt there may be neater ways.

while (<INPUT>){
    chomp;
    my $temp = "$1\n" if s/(.{120})//;
    while ($_) {
        $temp .= "$1\n" if s/(.{60})//;
    }
    print $temp;
}

Note that this does not deal with the possibility that any field may not
be an exact multiple of 60 chars, and assumes that the first field will
always be 120, as you stated.

Wyzelli


--
push@x,$_ for(a..z);push@x,' ';
@z='092018192600131419070417261504171126070002100417'=~/(..)/g;
foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;





------------------------------

Date: Mon, 6 Nov 2000 17:00:09 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Splitting variable length fixed records
Message-Id: <8u5aib$34l$1@hermes.nz.eds.com>


Peter Sundstrom <peter.sundstrom@eds.com> wrote in message
news:8u59tb$28h$1@hermes.nz.eds.com...
> I have a file of fixed records of variable length (newline terminated),
eg:
>
> F1F2..F120
>
> Where
>
> F1 is 120 bytes
> F2 up to F120 is 60 bytes.
>
> The minimum number of fields is 2 and max is 120.  What I want to do is to
> split each record onto a newline.

Whoops, s/record/field/

>
> I know the following regex doesn't work, but hopefully it shows what I'm
> attempting:
>
> s/^(.{120})(.{60})+/\1\n\2\n/;
>
> It will work if I only have 2 fields , but is there anyway to make it work
> if there are 3 or more fields?  Is there a better way to approach this
> problem?  I looked at unpack, but I couldn't see a way of utilising it for
> this situation.
>
>




------------------------------

Date: Mon, 6 Nov 2000 02:18:11 -0000
From: "mark" <markscott@barclays.net>
Subject: SSI scripts
Message-Id: <3a061377@news.jakinternet.co.uk>

' <!#exec cgi="/cgi-bin/ip.pl">
'
' My ISP says "Yes, we support SSI, but not executable SSI scripts."
' They support Perl


Sorry but I don't understand fully the above command line!
And if it is true that my server doesn't support SSI Executable scripts what
other
method could I use? (Please Read 'What am I doing wrong')

thanks for any advice mark.





------------------------------

Date: Sun, 05 Nov 2000 19:55:49 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: SSI scripts
Message-Id: <3A062BC5.E90CD951@vpservices.com>

mark wrote:

[snip of entire posting already sent to this newsgroup
 under a different subject heading]

> (Please Read 'What am I doing wrong')

Please post a question only once under one subject.

-- 
Jeff


------------------------------

Date: Sun, 05 Nov 2000 20:14:21 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: SSI scripts
Message-Id: <3A06301D.E719273C@vpservices.com>

mark wrote:
> 

First some definitions:

Support for SSI

   #1. ability to include plain text (e.g. a header or footer) in a web
page
   #2. ability to include output of a script in a web page

Support for Perl

   #3. ability to run Perl on the command line
   #4. ability to run Perl using the CGI protocol
   #5. ability to run Perl as part of an SSI (see #2 above)

> ' <!#exec cgi="/cgi-bin/ip.pl">

That is an attempt to do #2 and #5 above.

> ' My ISP says "Yes, we support SSI, but not executable SSI scripts."

In other words, #1 is ok but #2 is not.

> ' They support Perl

In other words, they #3 and/or #4 is ok but not #5 is not.

> is there another solution i could use?

a. get another ISP

b. find out whether they support #4 (CGI), and if they do, go to a
manual or newsgroup about CGI and learn how that differs from SSI and
how to use it

The Perl part of all this is the same regardless of how it is delivered
so you need to straighten out your ISP and SSI/CGI issues and then come
back here if you have Perl questions when you've got those other things
settled.

-- 
Jeff


------------------------------

Date: Sun, 5 Nov 2000 18:04:06 -0800
From: "D" <webmaster@kildare-signs.com>
Subject: Timeout option on CGI script?????
Message-Id: <uloN5.123564$47.1802041@news.bc.tac.net>

Good day,  I am learing to write cgi scripts on my localmachine and have
installed ActivaState Perl.  My question is this,  Is there an option or way
to have a script 'timeout' and exit? i'm asking becuase when i make a stupid
mistake (like an infinate loop) perl.exe cannot be removed from the task
manager,  I must reboot my computer to end the processes.......

I use linux for my webservers.  but for writing and testing scripts i use
windows2000, activestate, and apache 1.3.12.

Thanks for your help




------------------------------

Date: Mon, 06 Nov 2000 02:01:11 GMT
From: Tim Richardson <ter@my-deja.com>
Subject: undocumented fatal error, 5.6, unicode
Message-Id: <8u53d4$7q6$1@nnrp1.deja.com>

I get this fatal error message, not documented in my distribution:

Can't find unicode character property definition via main->e or e.pl at
unicode/Is/e.pl line 0

I am using ActiveState perl 5.6.0 build 618 (built Sep 13) on Windows
95. I am posting here on the assumption that this is a Perl problem, not
a Windows or ActiveState problem.

I would like to know what this error means, and why it happened.

The code causing the error is this line:


if ($PERL !~ /perl/i || $WBProg =~ m/$PERL/ || $PERL eq 'perl') {

 ...


If the line is rewritten without the middle test, it is ok.
Ie, this is ok:

if ($PERL !~ /perl/i ||  $PERL eq 'perl') {
 ...


when I run it,
$PERL has the value "C:\perl\bin\perl.exe"
$WBProg has the value "demo.cgi"


For more context, here is the subroutine containing the above.
(It is from the open-source cgi database application "woda" at
http://itc.fgg.uni-lj.si/woda/ )



sub wbWhoami {

	local ($package,$filename,$line) = caller;
	local ($i,$c);
	$filename =~ m|[^/]*$|;
	$WBPath = $`;			# in which dir is this script
	chop ($WBPath);			# remove the trailing /
	$WBFile = $&;			# what is the name of this
script
	$WBFile =~ m/(..)\.p.$/;	# langauage before dot.p
	$WBLang = $1;			# what is the language code
	$WBLib = "$WBPath/$WBLang";	#
	$WBProg = $0;			# command being executed
	$WBProg =~ m|(.*)/[^/]$|;	#

	$PERL = $PERL || $^X;		# first argument from command
line
	if ($PERL !~ /perl/i || $WBProg =~ m/$PERL/ || $PERL eq 'perl')
{	# looks like $^X reported wrong

	$PERL = '/usr/local/bin/perl';
	$PERL = '/usr/bin/perl' unless -e $PERL;
	$PERL = '' unless -e $PERL;
	}
	$PERLV = $] + 0.0;		# what Perl are we runing
}


--
Tim Richardson (search string: qweeblebeast)

--
Tim Richardson (search string: qweeblebeast)


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 06 Nov 2000 02:59:04 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: undocumented fatal error, 5.6, unicode
Message-Id: <slrn90c7jq.l2.mgjv@verbruggen.comdyn.com.au>

On Mon, 06 Nov 2000 02:01:11 GMT,
	Tim Richardson <ter@my-deja.com> wrote:
> I get this fatal error message, not documented in my distribution:
> 
> Can't find unicode character property definition via main->e or e.pl at
> unicode/Is/e.pl line 0

I don't know why it isn't in perldiag, but it's caused by backwhacks
which cause interpolation in your regular expression. The backwhacks
in front of the p, to be precise. See the perlre and perlunicode
documentation for an explanation of \p.

It \'s new in 5.6.0

> if ($PERL !~ /perl/i || $WBProg =~ m/$PERL/ || $PERL eq 'perl') {

if ($PERL !~ /perl/i || $WBProg =~ m/\Q$PERL/ || $PERL eq 'perl') {

or, alternatively, somewhere before this:

$PERL = quotemeta $PERL;

> when I run it,
> $PERL has the value "C:\perl\bin\perl.exe"
> $WBProg has the value "demo.cgi"

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
NSW, Australia                  | being a damn fool about it.


------------------------------

Date: Mon, 06 Nov 2000 01:02:16 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Using file with procedures
Message-Id: <sqnN5.189$Bf7.170836992@news.frii.net>

In article <8u3m8b$21vs$1@news.kis.ru>, Ildar Gabdullin <ildar@mera.ru> wrote:
>Hello, all.
>
>I have perl script with lot of procedures.
>How I can use these procedures in other perl script without converting
>1st script to module and using use <module_name> in second script ?
>Converting  to module is not appropriate, because I want to determine
>disposition of file with procedures at runtime.
>

You can always 'require' conditionally:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	t
#	t1.pm
#	t2.pm
#
echo x - t
sed 's/^X//' >t << 'END-of-t'
X#!/usr/bin/perl
X
Xuse strict;
Xuse warnings;
X
Xif (int(rand()*10) % 2)
X{
X    require t1;
X}
Xelse
X{
X    require t2;
X} 
END-of-t
echo x - t1.pm
sed 's/^X//' >t1.pm << 'END-of-t1.pm'
Xprint "this is t1\n";
END-of-t1.pm
echo x - t2.pm
sed 's/^X//' >t2.pm << 'END-of-t2.pm'
Xprint "this is t2\n";
END-of-t2.pm
exit

-- 
    This space intentionally left blank


------------------------------

Date: Mon, 6 Nov 2000 02:30:25 -0000
From: "mark" <markscott@barclays.net>
Subject: What am i doing wrong SSI?
Message-Id: <3a06165e@news.jakinternet.co.uk>

Hi and thanks for any help in advance, mark.

Okay ive been working really hard, alot of hours and getting nowhere,

All I want to do is log an ip and time stamp it, send it to a file that I
can look
at later, without a visitor knowing the ip has just been recorded.

The Following script works on my machine (Except for the IP) but when I put
it up nothing!!
So I have the following files in Question.
1/logip.html #this is my test page which should execute perl script (default
chmod)
2/ip.pl         #The perl script to send the info to ip.html (chmod 755)
3/ip.html     # The results?     (chmod 646)

<logip.html> looks like this.
---------------------------------------------------------------
<html>
<head>
<title>Log IP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<!#exec cgi="/cgi-bin/ip.pl">
<body bgcolor="#000000">
</body>
</html>
----------------------------------------------------------------------
<ip.pl>
#!/usr/bin/perl
$out="/newweb/ip.html";
open OUT, ">>$out" or die "Cannot open $out for write :$!";
print OUT ": ",scalar(localtime)," IP: ",$ENV{'REMOTE_ADDR'},"\n";
close OUT;
----------------------------------------------------------------------
<ip.html>
"Should have time and ip information"?

My ISP says "Yes, we support SSI, but not executable SSI scripts."
They support Perl
What can be the problem?

If the problem is SSI then is there another solution i could use?
Point me in the right direction?
Can't thank you enough if you can get me out of this hole I'm in!!







------------------------------

Date: Mon, 6 Nov 2000 17:16:27 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: What am i doing wrong SSI?
Message-Id: <8u5bgu$435$1@hermes.nz.eds.com>


mark <markscott@barclays.net> wrote in message
news:3a06165e@news.jakinternet.co.uk...
> Hi and thanks for any help in advance, mark.
>
> Okay ive been working really hard, alot of hours and getting nowhere,
>
> All I want to do is log an ip and time stamp it, send it to a file that I
> can look
> at later, without a visitor knowing the ip has just been recorded.
>
> The Following script works on my machine (Except for the IP) but when I
put
> it up nothing!!
> So I have the following files in Question.
> 1/logip.html #this is my test page which should execute perl script
(default
> chmod)
> 2/ip.pl         #The perl script to send the info to ip.html (chmod 755)
> 3/ip.html     # The results?     (chmod 646)
>
> <logip.html> looks like this.
> ---------------------------------------------------------------
> <html>
> <head>
> <title>Log IP</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <!#exec cgi="/cgi-bin/ip.pl">
> <body bgcolor="#000000">
> </body>
> </html>
> ----------------------------------------------------------------------
> <ip.pl>
> #!/usr/bin/perl
> $out="/newweb/ip.html";
> open OUT, ">>$out" or die "Cannot open $out for write :$!";
> print OUT ": ",scalar(localtime)," IP: ",$ENV{'REMOTE_ADDR'},"\n";
> close OUT;
> ----------------------------------------------------------------------
> <ip.html>
> "Should have time and ip information"?
>
> My ISP says "Yes, we support SSI, but not executable SSI scripts."
> They support Perl
> What can be the problem?
>
> If the problem is SSI then is there another solution i could use?
> Point me in the right direction?
> Can't thank you enough if you can get me out of this hole I'm in!!

This is OT for this newsgroup.  Essentially your ISP does not allow SSI
scripts, so you will have to use another method.  Why not just use the
webserver log?  It will have the IP address and time in it.




------------------------------

Date: Mon, 06 Nov 2000 02:44:49 GMT
From: "jawanth & meena vytheeswaran & nagarajan" <jawanth-and-meena@worldnet.att.net>
Subject: why can the browser do it but my perl prog. cannot ?
Message-Id: <BWoN5.21580$xJ4.1097044@bgtnsc06-news.ops.worldnet.att.net>

I have a Perl program which uses LWP etc. to access web pages on a site.
The site requires login. I login through netscape browser manually and then
run my program with the Netscape cookies  file. <hoping it as a way to pass
my state info to server, hoiping to tell it,  "hey, remember me, I am logged
in already...">
My object is to recursively access pages on the site (imagine a document
tree, with a root url which lists several urls etc.). Now, I am able to
access the last leaf url <which is just a url as far as I am concerned>.
However, I am NOT able to "navigate" down the tree starting at a root url.
When I access the root url, <lets call it the "starting point" of interest>
from my Perl program, it sends back an html asking to login, etc.
However, my Netscape browser is able to access it <once the login process is
over>.

1) I am not able to understand why i would be able to access the leaf url
through the Perl program at all when the server does not consider me as
logged in.
2) Did my cookie approach not fully accomplish what I was thinking (avoiding
writing code to do the login process, since I dont know how to do it !)?
<there must be more to it than simply copying cookies ?>
Any suggestions on overcoming this sort of problem would be highly
appreciated.




------------------------------

Date: Mon, 06 Nov 2000 03:43:56 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Why would subs not get the right args?
Message-Id: <0OpN5.192$Bf7.184975360@news.frii.net>

In article <MPG.146ea26a4e7aa52298970b@news.newsguy.com>,
Bill Moseley  <usenet@hank.org> wrote:
>On Sat, 04 Nov 2000 17:22:35 -0800 Jeff Zucker (jeff@vpservices.com) 
>remarked...
>> >     my $ckmon = @_;
>> > this prints '1', when it should print 'jan'.  What the heck is going on?
>> 
>> Nope, it should print '1'.  The symbol @_ is a list of items passed into
>> the sub.  The scalar value $ckmon is therefore equal to the length of
>> that list, i.e. 1.  If you want $ckmon to contain 'jan' you need to do
>> one of these:
>> 
>>    my $ckmon = shift;
>>    my $ckmon = $_[0];
>>    my($ckmon)= @_;
>
>I know TMTOWTDI, but that last one always makes me squirm a bit when I 
>see it.  But that's just me.  And I saw it quite a few times today.  
>When I see it in scripts I tend to deduct points. 
>

One of the things that made me say "cool" when I was first learning Perl
was this aggragate assignment dudad.  `Course that was in the days when the
coombs archive was cool too.

chris
-- 
    This space intentionally left blank


------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 4818
**************************************


home help back first fref pref prev next nref lref last post