[18354] in Perl-Users-Digest
Perl-Users Digest, Issue: 522 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 18 21:10:31 2001
Date: Sun, 18 Mar 2001 18:10:09 -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: <984967809-v10-i522@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 18 Mar 2001 Volume: 10 Number: 522
Today's topics:
Why do "Learning Perl" Books Do This? A Subroutine Ques <bankview1@[remove to send email]nucleus.com>
Re: Why do "Learning Perl" Books Do This? A Subroutine <uri@sysarch.com>
Re: Why do "Learning Perl" Books Do This? A Subroutine <mjcarman@home.com>
Re: Why do "Learning Perl" Books Do This? A Subroutine <bankview1@[remove to send email]nucleus.com>
Re: Why do "Learning Perl" Books Do This? A Subroutine <bart.lateur@skynet.be>
Re: Why do "Learning Perl" Books Do This? A Subroutine <bart.lateur@skynet.be>
Re: Why do "Learning Perl" Books Do This? A Subroutine (Abigail)
Re: Why do "Learning Perl" Books Do This? A Subroutine (Tad McClellan)
Re: Why do "Learning Perl" Books Do This? A Subroutine <nospam@nospam.net>
Re: Why do "Learning Perl" Books Do This? A Subroutine <joe+usenet@sunstarsys.com>
Re: Why do "Learning Perl" Books Do This? A Subroutine <flavell@mail.cern.ch>
Re: Why do "Learning Perl" Books Do This? A Subroutine <joe+usenet@sunstarsys.com>
write privilege for script. <amskape@ev1.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 18 Mar 2001 22:55:38 GMT
From: "Radicator" <bankview1@[remove to send email]nucleus.com>
Subject: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <K1bt6.33421$tr5.3987761@news1.telusplanet.net>
Hi all,
Popping my comp.lang.perl.misc cherry here
as this is my first post to this newsgroup.
Ahem . . . to continue,
I'm learning Perl using a book called "Perl:
Your Visual Blueprint for Building Perl
Scripts". Overall, it's a very good book, but it
has this example for passing arguments to a
subroutine (I've numbered the lines for
convenience):
1 #!/usr/bin/perl
2
3 print DisplayMessage("Please wait..", 4);
4 {
5 for ($x = 0; $x <= $_[1]; $x++)
6 {
7 $temp = $temp . $_[0] . "\n";
8 }
9 return $temp;
10 }
Here's what you get when you run the script:
[scripts]$ script.pl
Please Wait..
Please Wait..
Please Wait..
Please Wait..
Please Wait..
[scripts]$
Okay, I understand how everything in this
simple script works. I understand that the call
to the subroutine on line 3 contains two
arguments that are passed to the subroutine
in the array named @_. I understand how the
"for" function works on line 5, and that $_[1] will
be replaced by the number "4" from line 3.
Now, line 7 is what has me confused:
7 $temp = $temp . $_[0] . "\n";
I don't understand how $temp can be equal to
$ temp . $_[0] . "\n";
The first time the subroutine runs, $temp isn't
equal to anything. To prove this, I initialized
$temp = "XYZ" at the beginning of the script and
ran it again. I got the following printout:
[scripts]$ script.pl
XYZPlease Wait..
Please Wait..
Please Wait..
Please Wait..
Please Wait..
[scripts]$
I must be over-thinking this whole thing because,
to me, line 7 should just be written like this:
7 $temp = $_[0] . "\n";
But that only results in this printout:
[scripts]$ script.pl
Please Wait..
[scripts]$
Somehow, having the variable $temp on both
sides of the equal sign in line 7 makes it reiterate
the subroutine properly but I can't figure out how
or why for the life of me.
Can anyone explain in plain english to me why it
actually does work and why it doesn't give a result like
[scripts]$ script.pl
Please Wait..
Please Wait..Please Wait..
Please Wait..Please Wait..
Please Wait..Please Wait..
Please Wait..Please Wait..
[scripts]$
Thanks,
D.
------------------------------
Date: Sun, 18 Mar 2001 23:36:41 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <x7zoei4pkl.fsf@home.sysarch.com>
>>>>> "R" == Radicator <bankview1@[remove to send email]nucleus.com> writes:
R> I'm learning Perl using a book called "Perl: Your Visual Blueprint
R> for Building Perl Scripts". Overall, it's a very good book, but it
R> has this example for passing arguments to a subroutine (I've
R> numbered the lines for convenience):
R> 1 #!/usr/bin/perl
R> 2
R> 3 print DisplayMessage("Please wait..", 4);
R> 4 {
R> 5 for ($x = 0; $x <= $_[1]; $x++)
R> 6 {
R> 7 $temp = $temp . $_[0] . "\n";
R> 8 }
R> 9 return $temp;
R> 10 }
based on that code, i would burn the book for fuel.
that is horrible code on so many levels.
R> Now, line 7 is what has me confused:
R> 7 $temp = $temp . $_[0] . "\n";
R> I don't understand how $temp can be equal to
R> $ temp . $_[0] . "\n";
well, if the book doesn't explain basic assignment, then it qualifies as
even worse than i had previously stated. burning it is too good. shred
it and use it as catbox filler.
R> Can anyone explain in plain english to me why it
R> actually does work and why it doesn't give a result like
get a better book and forget everything this one attempted to teach
you. that is the best solution to your query.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Sun, 18 Mar 2001 23:52:34 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <3AB54A97.94F65988@home.com>
Radicator wrote:
>
> I'm learning Perl using a book called "Perl:
> Your Visual Blueprint for Building Perl
> Scripts". Overall, it's a very good book,
Never heard of it, and if the code sample you showed is indicative of
the rest of the book, I wouldn't consider it a good text. The general
consensus here for Perl books is don't buy anything that doesn't say
O'Reilly on it.
> but it has this example for passing arguments to a
> subroutine (I've numbered the lines for
> convenience):
>
> 1 #!/usr/bin/perl
> 2
No -w or strict. Bad book!
> 3 print DisplayMessage("Please wait..", 4);
> 4 {
> 5 for ($x = 0; $x <= $_[1]; $x++)
> 6 {
> 7 $temp = $temp . $_[0] . "\n";
> 8 }
> 9 return $temp;
> 10 }
Surely you've left something out? There's a call there, and a block, but
no sub declaration. If I read the rest of your post correctly, though,
there should be the line
sub DisplayMessage
between 3 & 4 above.
> Okay, I understand how everything in this
> simple script works.
Well, almost everything, or you wouldn't be here. ;)
> I understand that the call
> to the subroutine on line 3 contains two
> arguments that are passed to the subroutine
> in the array named @_. I understand how the
> "for" function works on line 5, and that $_[1] will
> be replaced by the number "4" from line 3.
Okay so far.
> Now, line 7 is what has me confused:
>
> 7 $temp = $temp . $_[0] . "\n";
>
> I don't understand how $temp can be equal to
> $ temp . $_[0] . "\n";
You're thinking mathematically. Don't. The = on that line does not mean
"is equal to." It's the assignment operator. It assigns the value of the
RHS (right hand side) to the variable on the LHS (left hand side).
Maybe a simple example will show it best:
$x = 5;
does *not* mean that "$x is equal to five." It means "set $x to five."
So, for your example, the first time through the loop, $temp is
undefined.
$temp . $_[0] . "\n" evaluates to "Please wait..\n"
This value is assigned to $temp.
The second time through the loop, $temp is equal to "Please wait..\n"
which means that
$temp . $_[0] . "\n" evaluates to "Please wait..\nPlease wait..\n"
This value is assigned to $temp.
etc., etc. for the remaining loops.
> The first time the subroutine runs, $temp isn't
> equal to anything. To prove this [...]
Good, you're thinking! (And you've also uncovered a shortcoming of the
text -- failure to properly scope the variables used. Let's hope that
comes in chapter two.)
-mjc
------------------------------
Date: Sun, 18 Mar 2001 23:43:59 GMT
From: "Radicator" <bankview1@[remove to send email]nucleus.com>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <3Lbt6.33482$tr5.4004904@news1.telusplanet.net>
"Uri Guttman" <uri@sysarch.com> wrote in message >
> based on that code, i would burn the book for fuel.
> that is horrible code on so many levels.
>
> get a better book and forget everything this one attempted to teach
> you. that is the best solution to your query.
>
> uri
>
LOL!
Okay, I'll burn it when I'm done . . . promise.
I'm still curious, however, as to how that bit o' code actually works.
D.
------------------------------
Date: Mon, 19 Mar 2001 00:06:32 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <cviabtgkii7gpqrsllvgag6jl7hqq81tdt@4ax.com>
"Radicator" <bankview1@[remove to send email]nucleus.com> wrote:
>1 #!/usr/bin/perl
>2
>3 print DisplayMessage("Please wait..", 4);
>4 {
>5 for ($x = 0; $x <= $_[1]; $x++)
>6 {
>7 $temp = $temp . $_[0] . "\n";
>8 }
>9 return $temp;
>10 }
You must have dropped a line. Put this between lines 3 and 4:
sub DisplayMessage
>Now, line 7 is what has me confused:
>
>7 $temp = $temp . $_[0] . "\n";
>
>I don't understand how $temp can be equal to
>$ temp . $_[0] . "\n";
It isn't. That is not an equation as in math: that's an assignment. The
previous value of $temp gets as a new value the old value of $temp (yes,
the same variable, but that doesn't matter), with the first argument of
the sub (the string) appended, and a newline.
>The first time the subroutine runs, $temp isn't
>equal to anything.
Yes. But the silly buggers have forgotten to localize the variable! It
is a global variable! So each time the sub runs, the previous value is
retained, and a new value is added at the end. Or, maybe you just forgot
that line too.
Besides, the name of the sub is wrong. It does NOT display anything. It
simply returns the input string (1st parameter) n times (the second
parameter). Here's an improved (and renamed) version of that sub:
sub stutter
{
my $temp = '';
for ($x = 0; $x <= $_[1]; $x++)
{
$temp .= $_[0] . "\n";
}
return $temp;
}
Yuck, I hate that kind of code formatting.
p.s. This is not a "Learning Perl" book. There's only one "Learning
Perl" book, and it's written mainly by Randal L. Schwartz, and published
by O'Reilly.
--
Bart.
------------------------------
Date: Mon, 19 Mar 2001 00:11:10 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <vhjabtok3vahf7f9usbkrroaeijn7mc6c9@4ax.com>
Michael Carman wrote:
>The general
>consensus here for Perl books is don't buy anything that doesn't say
>O'Reilly on it.
Bzzzt! Wrong. O'Reilly pushlishes very good and reasonably priced
computer books, but they're not the only game in town. Otherwise, Damian
Conway's OOP book would have been published by O'Reilly.
--
Bart.
------------------------------
Date: 19 Mar 2001 00:16:51 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <slrn9bajvi.a1n.abigail@tsathoggua.rlyeh.net>
Michael Carman (mjcarman@home.com) wrote on MMDCCLVI September MCMXCIII
in <URL:news:3AB54A97.94F65988@home.com>:
|| Radicator wrote:
|| >
|| > I'm learning Perl using a book called "Perl:
|| > Your Visual Blueprint for Building Perl
|| > Scripts". Overall, it's a very good book,
||
|| Never heard of it, and if the code sample you showed is indicative of
|| the rest of the book, I wouldn't consider it a good text. The general
|| consensus here for Perl books is don't buy anything that doesn't say
|| O'Reilly on it.
That's not the general consensus at all.
There are better Perl books out there than most of the ORA books
on Perl.
Abigail, who doesn't see why ORA has such a good name.
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Sun, 18 Mar 2001 18:34:48 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <slrn9bahgn.253.tadmc@tadmc26.august.net>
Radicator <bankview1@[removetosendemail]nucleus.com> wrote:
>
>this is my first post to this newsgroup.
You might want to have a look at:
http://www.augustmail.com/~tadmc/clpmisc_guide/
[ I have completely dropped the ball on getting that autoposted here.
I'll work on that next week.
]
>I'm learning Perl using a book called "Perl:
>Your Visual Blueprint for Building Perl
>Scripts". Overall, it's a very good book, but it
^^^
The subroutine is fine (modulo the typos that, I assume, you inserted),
though ugly.
I see something else that makes me very suspicious of the book's
quality though.
Maybe it is "ugly" because it is written for "teaching" though.
A more idiomatically Perl version might be:
sub DisplayMessage {
my($msg, $count) = @_;
$temp .= "$msg\n" foreach 0 .. $count;
return $temp;
}
or even:
sub DisplayMessage {
my($msg, $count) = @_;
return "$msg\n" x ($count+1);
}
>has this example for passing arguments to a
>subroutine
Using the args in @_ directly is dangerous on top of ugly.
Subroutine args are passed by reference. If you change $_[0]
in your subroutine body, you also change the corresponding
element in the *caller's* array.
You most often want to avoid the possibility of "action at a distance"
like that, so you should as a matter of course immediately copy @_
to other variables and access only those copies in your subroutine body.
This has the effect of converting the "pass by reference" semantics
into "pass by value" semantics. Much safer.
>(I've numbered the lines for
>convenience):
>
>1 #!/usr/bin/perl
If you have gotten far enough along in the book to be discussing
subroutines, then you should surely have already covered warnings
and strictures.
#!/usr/bin/perl -w
use strict;
Ahh, that's better.
>2
>3 print DisplayMessage("Please wait..", 4);
>4 {
>5 for ($x = 0; $x <= $_[1]; $x++)
>6 {
>7 $temp = $temp . $_[0] . "\n";
>8 }
>9 return $temp;
>10 }
>
>Here's what you get when you run the script:
^^^^^^^
_I_ don't get that. I get:
Undefined subroutine &main::DisplayMessage called at ...
Please do not try and type in code, use copy/paste, else you'll
just get a bunch of wise ass comments about your typos instead
of help with your real problem.
I see two *global variables* there. That is bad too.
I think your book is cutting rather too many corners.
>[scripts]$ script.pl
>Please Wait..
>Please Wait..
>Please Wait..
>Please Wait..
>Please Wait..
>[scripts]$
>
>Okay, I understand how everything in this
>simple script works.
>Now, line 7 is what has me confused:
>
>7 $temp = $temp . $_[0] . "\n";
>
>I don't understand how $temp can be equal to
>$ temp . $_[0] . "\n";
That is in a loop that executes 5 times. After the loop, you will
have 5 copies of the first argument with a newline after each
in the $temp variable, which is used as the return value.
It is a multiline string contained in a single scalar variable.
>The first time the subroutine runs, $temp isn't
>equal to anything. To prove this,
If you had enabled warnings, perl itself would have proven it *for you*.
>I initialized
>$temp = "XYZ" at the beginning of the script and
>ran it again. I got the following printout:
>
>[scripts]$ script.pl
>XYZPlease Wait..
>Please Wait..
>Please Wait..
>Please Wait..
>Please Wait..
>[scripts]$
>
>I must be over-thinking this whole thing because,
>to me, line 7 should just be written like this:
>
>7 $temp = $_[0] . "\n";
No, like this:
$temp .= $_[0] . "\n";
^^
(or the way the book author had it)
>But that only results in this printout:
>
>[scripts]$ script.pl
>Please Wait..
>[scripts]$
The print() only executes once. You have only one "Please Wait.."
in $temp. You get only one line of output.
The book's code has
"Please Wait..\nPlease Wait..\nPlease Wait..\nPlease Wait..\nPlease Wait..\n";
in $temp. It gets five lines of output from the single print().
>Somehow, having the variable $temp on both
>sides of the equal sign in line 7 makes it reiterate
>the subroutine properly
It does NOT reiterate (call?) the subroutine.
It adds stuff to the end of the value of $temp, and stores the
result back in to $temp.
>Can anyone explain in plain english to me why it
>actually does work
You print a string with one newline, one line of output.
The book prints a string with five newlines, five lines of output.
>and why it doesn't give a result like
>
>[scripts]$ script.pl
>Please Wait..
>Please Wait..Please Wait..
>Please Wait..Please Wait..
>Please Wait..Please Wait..
>Please Wait..Please Wait..
>[scripts]$
I cannot figure out how you expect to get that output...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 19 Mar 2001 00:42:32 GMT
From: "David Ehrens" <nospam@nospam.net>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <YBct6.20808$mH4.4579462@typhoon.ne.mediaone.net>
"Michael Carman" <mjcarman@home.com> wrote in message
news:3AB54A97.94F65988@home.com...
...
> Never heard of it, and if the code sample you showed is indicative of
> the rest of the book, I wouldn't consider it a good text. The general
> consensus here for Perl books is don't buy anything that doesn't say
> O'Reilly on it.
I generally share your high regard for O'Reilly's books, but even the
first edition of the Perl book by Larry Wall and Randal Schwartz was
bad. In an effort to put the reader at ease, the discussion of splice,
pop, push, etc. is so convoluted that the author has to keep going back
over things. At one point, after a particularly poor job of explaining
Perl array functions, the author says, "Now that you've waded through
this lengthy explanation of splice(), we should tell you that you'll
almost never use it." But a few pages later, he says, "Just so you don't
think the splice() function is totally useless, here's an actual...".
Aaargh! Then, the book finishes up with a lot of unexplained examples of
Perl programs. Filler.
Most of the O'Reilly books are OK, but it's not wise to generalize. The
WROX books are very good, in my opinion. I don't know if they have a
Perl title, though.
David Ehrens
------------------------------
Date: 18 Mar 2001 19:55:25 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <m31yru7f2a.fsf@mumonkan.sunstarsys.com>
"Radicator" <bankview1@[remove to send email]nucleus.com> writes:
Subject: Re: Why do "Learning Perl" Books Do This?...
^^^^^^^^^^^^^^^
Be careful not to overgeneralize. _Learning Perl_ by
Wall and Christiansen is generally regarded as a pretty
decent book for beginners. There are others as well,
but based on the code you've presented here, I doubt
_Perl: Your Visual Blueprint for Building Perl Scripts_
is among them.
[...]
> 1 #!/usr/bin/perl
^
-w
use strict;
If the book ain't got these two things (warnings and strictures)
liberally applied throughout the code examples, just throw it in
the trash and start fresh with another book that does.
> 2
> 3 print DisplayMessage("Please wait..", 4);
3+ sub DisplayMessage
> 4 {
> 5 for ($x = 0; $x <= $_[1]; $x++)
> 6 {
> 7 $temp = $temp . $_[0] . "\n";
> 8 }
> 9 return $temp;
> 10 }
It's no wonder you are confused. That is a lousy example to
learn from. For one thing, the variable and subroutine names
are horrible- DisplayMessage does nothing of the kind; where
did $x come from (what's it good for?); and why would anyone
name a global variable $temp? And of course, it will not compile
cleanly under use strict, and will give a "use of uninitialized
value..." warning under -w.
> Okay, I understand how everything in this
> simple script works. I understand that the call
> to the subroutine on line 3 contains two
> arguments that are passed to the subroutine
> in the array named @_. I understand how the
> "for" function works on line 5, and that $_[1] will
~~~~~~~~
better to say "statement" here
> be replaced by the number "4" from line 3.
>
> Now, line 7 is what has me confused:
>
> 7 $temp = $temp . $_[0] . "\n";
"=" is really an "assignment", and how it works
depends on context. Reading left-to-right, I
would say that what happens is:
1) perl sees an assignment to the scalar $temp.
(perl behaves differently in different contexts,
so the determination of context is an important
step that you should not overlook).
2) perl evaluates the right side of the assignment,
which amounts to a concatenation of $temp,
$_[0], and "\n".
3) perl replaces the old string in $temp (the
one that was used to carry out step 2) with
the new result from step 2.
Note: perl has a (numeric) equivalence test operator (==)
that _tests_ for equality. It is very important to
remember the difference between these two, since it's
a very common error for young programmers is to mix them
up in their code.
> I don't understand how $temp can be equal to
> $ temp . $_[0] . "\n";
It's not- $temp is *reassigned* to this value.
> The first time the subroutine runs, $temp isn't
> equal to anything.
right- it should have been declared somewhere:
my $temp = ''; # declared as a lexical and prepped for
# manipulation as a character string
[...]
> I must be over-thinking this whole thing because,
> to me, line 7 should just be written like this:
No- the problem is that the "DisplayMessage" sub isn't
doing any displaying. Only the print sub does.
[...]
> Can anyone explain in plain english to me why it
> actually does work and why it doesn't give a result like
>
> [scripts]$ script.pl
> Please Wait..
> Please Wait..Please Wait..
> Please Wait..Please Wait..
> Please Wait..Please Wait..
> Please Wait..Please Wait..
> [scripts]$
Each time through the loop, the $temp variable gets another
"Please Wait..\n"
tacked onto the end of it. DisplayMessage passes the final
value of $temp to print(), which ultimately produces the output
on your screen.
Try adding another line just like line 3 (but change the message)
to the bottom of your script and rerun it.
12 print DisplayMessage("4 additional waits..", 1);
13 print DisplayMessage("more garbage output..", 1);
Here's how I would have written the example:
#!/usr/bin/perl -w
use strict;
print duplicate_line("Please wait...", 4);
sub duplicate_line {
# lame example of how to use a C-like
# for loop to duplicate a line
my ($text, $number) = @_; # set input string and multiplicity
my $result = ''; # prep for string manipulation
for ( my $index = 0; $index < $number; ++$index ) {
$result .= "$text\n"; # append string to $result
}
return $result;
}
__END__
Now if you look carefully at the for loop, you'll notice
that $index never appears inside the loop. Hence you should
be able to eliminate the loop altogether:
sub duplicate_line {
my ($text, $number) = @_; # set input string and multiplicity
my $result = "$text\n" x $number;
return $result; # same returned value in any context
}
Finally, why the hell do you need a sub, or even a script,
to do this?
% perl -we 'print "Please Wait...\n" x 4'
% perl -we 'print +("Please Wait...\n") x 4'
If your book can't help you understand the difference between
these two one-liners, it's time to look for a better one.
HTH
--
Joe Schaefer "Language is a city to the building of which every human being
brought a stone."
--Mark Twain
------------------------------
Date: Mon, 19 Mar 2001 02:00:41 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <Pine.LNX.4.30.0103190157590.13884-100000@lxplus003.cern.ch>
On 19 Mar 2001, Abigail wrote:
> There are better Perl books out there than most of the ORA books
> on Perl.
But how is the innocent newbie to recognise them amongst all the chaff
and pot-boilers? You aren't helping. Maybe you're just so far ahead
of the game that you can't identify with the problem.
> Abigail, who doesn't see why ORA has such a good name.
OK, but without a better standard to measure by, ...
------------------------------
Date: 18 Mar 2001 20:23:32 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Why do "Learning Perl" Books Do This? A Subroutine Question.
Message-Id: <m3wv9m5z6z.fsf@mumonkan.sunstarsys.com>
Joe Schaefer <joe+usenet@sunstarsys.com> writes:
> "Radicator" <bankview1@[remove to send email]nucleus.com> writes:
>
> Subject: Re: Why do "Learning Perl" Books Do This?...
> ^^^^^^^^^^^^^^^
>
> Be careful not to overgeneralize. _Learning Perl_ by
> Wall and Christiansen is generally regarded as a pretty
^^^^
Uhh- sorry about that :( It should be *Schwartz* and
Christiansen. I got my gurus mixed up again :)
--
Joe Schaefer "We are all naive; only about different things."
--Mark Twain
------------------------------
Date: Sun, 18 Mar 2001 19:02:40 -0600
From: AmSkape <amskape@ev1.net>
Subject: write privilege for script.
Message-Id: <3AB55AB0.139BE86E@ev1.net>
I have a perl script that is accessed from a web interface. It was
written to allow a site administrator to make changes on certain web
pages. But the web pages are in a directory that does not allow regular
web users write priveleges. How can allow the script write priveleges to
the directory without leaving the directory writable for everyone? By
the way, I'm using a IIS4.0 server.
------------------------------
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 V10 Issue 522
**************************************