[10512] in Perl-Users-Digest
Perl-Users Digest, Issue: 4104 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 29 14:06:32 1998
Date: Thu, 29 Oct 98 11:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 29 Oct 1998 Volume: 8 Number: 4104
Today's topics:
Re: after gathering information through a form and prin <perlguy@technologist.com>
Re: changing file timestamp in Win32 <murrayb@vansel.alcatel.com>
Re: Comparative modularization (was: Not to start a lan <d-edwards@uchicago.edu>
Re: Crypt function (Brian G.)
Re: Crypt function (Michael J Gebis)
Re: Getting HTTP headers <rootbeer@teleport.com>
Re: Help with Problem in Readdir. <rootbeer@teleport.com>
Re: Not to start a language war but.. (Anita M Wilcox)
Re: Parsing large text file (TIA) <jdporter@min.net>
Re: Perl & Y2K - booby trap code <merlyn@stonehenge.com>
Re: Perl & Y2K - booby trap code <jdporter@min.net>
Re: Perl & Y2K - booby trap code <zenin@bawdycaste.org>
Re: Perl & Y2K - booby trap code (Matt Knecht)
Re: Perl Question <rootbeer@teleport.com>
Re: Perl vs ASP in MS IIS 4.0 <perlguy@technologist.com>
Re: pl2exe - disappearing result <rootbeer@teleport.com>
Re: Replace pattern on multiple files? <tchrist@mox.perl.com>
Re: socket connection via udp (M.J.T. Guy)
Re: socket connection via udp <zenin@bawdycaste.org>
Re: Why is perl better than shell scripting language? <perlguy@technologist.com>
Re: Why is perl better than shell scripting language? <jdporter@min.net>
Re: Why is perl better than shell scripting language? <rootbeer@teleport.com>
Re: Why is perl better than shell scripting language? (brian d foy)
Re: Why is perl better than shell scripting language? (Brand Hilton)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 29 Oct 1998 16:56:54 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: after gathering information through a form and printing outresponse want to continue printing on the same page using a PERL script
Message-Id: <36389E56.23C9C564@technologist.com>
John,
If I read this correctly. You are trying to get some form input via a
browser, and then print out some results back onto the same page (I am
assuming the form page).
AFAIK, you cannot do this "purely". WHat I mean is that when you send a
response back from a CGI script, you MUST send it an HTTP header so the
content type is known. If you do not send a header, you'll get a server
error.
The only I could think of doing this would be to save the current page
somehow and then output the page you saved along with the results.
However, a No Parse Header script *MAY* be able to do what you are
looking for. Take a look at the specs a www.w3.org and wherever else
you can find information in NPH scripts to find out for sure...
Good luck!
Brent
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: 29 Oct 1998 09:15:45 -0800
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: changing file timestamp in Win32
Message-Id: <u4ssn70hq.fsf@vansel.alcatel.com>
lr@hpl.hp.com (Larry Rosler) writes:
> I, for one, will protest here against such puerile behavior until it is
> stamped out. Anyone else who cares at all about the future of Perl or
> of the reputation of Perl professionals should do the same.
I have to agree with Larry. There are a lot of us out here who pride
ourselves on getting work done. Perl helps us do that. Getting work
done often means that you don't get to slect your operating system of
choice. This no longer distresses me. If there's a Perlish port for
the Palm III in the near future, I will solve problems there too. OS
must be irrelevant to me in order to make my living: I fix things. I
therefore naturally resent the implication that, because I frequently
fix things on a Win32 platform, I am somehow unable to fix things at
all. I can fix them just fine, thank you. Any professional can.
--
Brad J. Murray
Software Analyst "Cogito ergo am."
Alcatel Canada (DRH)
------------------------------
Date: Thu, 29 Oct 1998 17:50:16 GMT
From: Darrin Edwards <d-edwards@uchicago.edu>
Subject: Re: Comparative modularization (was: Not to start a language war but..)
Message-Id: <tg67d3z293.fsf@noise.bsd.uchicago.edu>
Tres Seaver <tseaver@palladion.com> writes:
> Larry Wall wrote:
> >
> > In article <wr3pvbcbl09.fsf@yeenoghu.cs.uchicago.edu>,
> > Lyn A Headley <laheadle@boguscs.uchicago.edu> wrote:
> > >
> > >I think it is most pertinent to say that *Scheme* lacks a module
> > >system. :)
> >
> > Odd how you can say something pertinent and impertinent
> > simultaneously. :-)
>
> Actually, that should be "pertinent and impertinently," no?
>
It _can_ be, but I'm not sure that it _has_ to be:
"What an impertinent thing to say!" exclaimed Aunt Selma.
Turning to Marge, Aunt Patty intoned coldly, "That child of yours
always speaks so impertinently."
Barely containing her rage, Marge snapped, "Go at once to your room,
you impertinent child!"
In the silence that followed, Homer was heard to mutter, "Mmmm... context-
dependent semantics..."
Darrin
------------------------------
Date: 29 Oct 1998 13:02:41 -0500
From: briang@access5.digex.net (Brian G.)
Subject: Re: Crypt function
Message-Id: <71aak1$bvt@access5.digex.net>
In article <71a1sg$cfs@panix.com>, clay irving <clay@panix.com> wrote:
>In <71a0va$joe@news5-gui.server.cableol.net> <k.thomson@scet.com> writes:
>
>>I'm a bit confuser I can get a string encrypted with the crypt function
>
>>eg
>
>>$result = crypt ("kevin","ke");
>
>>But how do you enrypt it?
>
>Read the documentation!
>
> NAME
>
> crypt - one-way passwd-style encryption
You can't decrypt it.
If you want to verify if someone entered a password correctly, you
take what they type in, encrypt it with the same salt (the "ke" in
your example) and see if it generates the same encrypted string as
you generated the first time. If so, valid password, if not, bad.
Here's the example from the "perldoc -f crypt" manpage:
-----
Here's an example that makes sure that whoever runs this program knows
their own password:
$pwd = (getpwuid($<))[1];
$salt = substr($pwd, 0, 2);
system "stty -echo";
print "Password: ";
chop($word = <STDIN>);
print "\n";
system "stty echo";
if (crypt($word, $salt) ne $pwd) {
die "Sorry...\n";
} else {
print "ok\n";
}
-----
- Brian G.
------------------------------
Date: 29 Oct 1998 18:47:32 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Crypt function
Message-Id: <71ad84$maq@mozo.cc.purdue.edu>
<k.thomson@scet.com> writes:
}I'm a bit confuser I can get a string encrypted with the crypt function
Go to CPAN (start at www.perl.com if you don't know what CPAN is) and
look for the Crypt::IDEA or Crypt::DES modules.
If you're encrypting information that you consider valuable, read Applied
Cryptography by Schneier to understand these methods. (You might
also want to look at http://www.eff.org/descracker.html too.) Be
aware that it's HARD to get encryption right, so if you really care,
the research is necessary.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Thu, 29 Oct 1998 18:01:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Getting HTTP headers
Message-Id: <Pine.GSO.4.02A.9810291001400.3421-100000@user2.teleport.com>
On Thu, 29 Oct 1998 keydet89@yahoo.com wrote:
> I have been trying to write a small script that I can use to quickly
> check some of the values of HTTP headers on my web servers.
Get LWP from CPAN. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 29 Oct 1998 18:24:39 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help with Problem in Readdir.
Message-Id: <Pine.GSO.4.02A.9810291021460.3421-100000@user2.teleport.com>
On Thu, 29 Oct 1998, Brent Perschbacher wrote:
> On Wed, 28 Oct 1998, Knight wrote:
>
> > I am running perl on win95 and have created a program that opens a directory
> > and it's subdirectories, reads them, them creates a html page with links to
> > any files of a specified type. The problem is that when I download a binary
> > file through ftp, such as a jpg or gif, and run this program on the
> > directory which contains that file, it is not recognized. (It is not listed)
> > other files in the directory are. Then when I rename the file it is
> > recognized. Why does this happen and how can I fix it?
> You might want to check the permissions on the file after you download it.
The permission bits of the file itself don't affect readdir on Win32, do
they? They shouldn't.
> They may be changed so that ftp users can't modify them. When you rename
> the file it is probably reseting the permissions.
Changing a file's name doesn't change its permission bits on Win32, does
it? It shouldn't.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 29 Oct 1998 18:29:23 GMT
From: amw@world.std.com (Anita M Wilcox)
Subject: Re: Not to start a language war but..
Message-Id: <F1Lq10.F3H@world.std.com>
>++ Name a platform Python supports that Perl doesn't, I dare you.
>++ However I'd be surprised if I couldn't name a few that Perl
>++ supports but Python doesn't.
>
>Well, arguebly, the Mac. While Python was developped on the Mac, no
>official version of Perl ran on the Mac. There have been separate ports to
>the Mac, but that's all. I'd be surprised to see a Mac version of 5.005.
>
<JOKE>
Real programmers don't use Macs anyway :-) :-)
</JOKE>
aw
------------------------------
Date: Thu, 29 Oct 1998 13:06:33 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Parsing large text file (TIA)
Message-Id: <3638AEA8.388A34F9@min.net>
The use of comp.lang.perl is to be eschewed henceforthwith. Thank you.
Jamie Hoglund wrote:
>
> I *think* you can screw around with the $/ variable. (or is it $\ I can't
> remember)
It's $/. How hard would it have been to look it up?
$/ = "\nPersonID:";
> The each $record = <FILE>;
>
> will be a complete paragraph, and you'll have to manually split out the
> \n's: @lines = split(/\n/,$record);
Very important to chomp with something like this.
Otherwise you'd have the "\nPersonID:" hanging on to the *end* of each
record string.
Also, be sure to ignore empty records, such as the first one.
Or even better, validate that each string actually contains a record.
> Be careful, messing around with the new line variable will break nearly
> everything else if it isn't restored.
Right. That's why god invented local().
--
John "Throbblefoot" Porter
Please Don't "Courtesy CC" me.
I read this newsgroup fanatically. You know that!
("Emailed only" is fine, though.)
"The people at the Grey Hotel
Are either aged or unwell." -- EG
------------------------------
Date: Thu, 29 Oct 1998 17:25:21 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <8cg1c7uvpj.fsf@gadget.cscaper.com>
>>>>> "Joergen" == Joergen W Lang <jwl@_munged_worldmusic.de> writes:
Joergen> Here's an example someone came up with after a discussion in
Joergen> de.comp.lang.perl. This uses localtime to get a 4-digit year without
Joergen> having to do number formatting.
Joergen> I'm not sure if it meets the requirements of the original poster, which
Joergen> a glance at dejanews did not bring up but I like it as a quick
Joergen> workaround.
Joergen> my $four_digit_year = ((split / /, localtime)[4]);
I don't think you want either "4" or / / there. Witness:
use Date::Manip;
for ("1 Oct 98", "10 Oct 98") {
my $date = ParseDate($_);
my $secs = UnixDate($date, "%s");
print "$_ => ", join(":", split / /, localtime $secs), "\n";
}
=>
1 Oct 98 => Thu:Oct::1:00:00:00:1998
10 Oct 98 => Sat:Oct:10:00:00:00:1998
The year is field 7 when day of month is less than 10 and field 6
otherwise.
One solution would be using -1 there. Another would be using /\s+/
so that the multiple spaces don't make multiple delimiters.
In any case, your code wasn't tested. Just like some of mine that
later turns out to be wrong. :)
use Date::Manip; print map { chr UnixDate(ParseDate($_),"%j") } split " ", "03/15/58 04/27/41 04/25/62 04/26/37 02/01/70 04/07/82 04/20/21 04/21/75 04/26/11 04/14/81 04/11/53 04/24/49 02/01/97 03/21/70 04/11/49 04/24/59 04/18/67 02/01/41 04/13/12 04/07/55 04/09/86 04/16/00 04/11/62 04/24/17 02/13/69";
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 29 Oct 1998 13:16:49 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <3638B111.54B00611@min.net>
Uri Guttman wrote:
>
> [use of =>] outside of hash data is disquieting.
> it may look cuter but it has semantic affects that ',' doesn't have.
I totally agree with you on this one, Uri.
There can be no reason to use => in a construction like
push @array => $item
other than sheer (attempted) cuteness.
--
John "Throbblefoot" Porter
Please Don't "Courtesy CC" me.
I read this newsgroup fanatically. You know that!
("Emailed only" is fine, though.)
"The people at the Grey Hotel
Are either aged or unwell." -- EG
------------------------------
Date: 29 Oct 1998 18:29:48 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <909685758.189480@thrush.omix.com>
John Porter <jdporter@min.net> wrote:
>snip<
: There can be no reason to use => in a construction like
: push @array => $item
: other than sheer (attempted) cuteness.
Same for:
bless $self => 'Class';
But that doesn't mean it isn't easier to read. Or how about:
$HashObject->addElement ($name => $value);
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Thu, 29 Oct 1998 18:51:47 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <7P2_1.6$1g4.3313696@news2.voicenet.com>
John Porter <jdporter@min.net> wrote:
>There can be no reason to use => in a construction like
>
> push @array => $item
>
>other than sheer (attempted) cuteness.
A while back, there was a thread about using => in situations that it
makes sense in, or makes code read easier. Aside from constructing
hashes, I've also been partial to:
use File::Copy;
move $old_file => $new_file;
copy $old_file => $new_file;
Besides, 'push @array => $item' looks backwards to me. You're pushing
something *into* the array, so for => to make sense, it should read
more like 'push $item => @array'. Which of course won't work (But it
looks nice, huh?). Even if it did work, it's just cute and not very handy.
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Thu, 29 Oct 1998 17:58:50 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl Question
Message-Id: <Pine.GSO.4.02A.9810290957430.3421-100000@user2.teleport.com>
On Thu, 29 Oct 1998 kottelo@my-dejanews.com wrote:
> This is your best anwser?
No, I keep better ones for paying customers. :-)
> I have Perl in my computer... but not a newbie documentation!!!!
Perhaps you should take a course on beginning programming. Once you've
done that, you should be ready for the Llama book. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 29 Oct 1998 18:06:41 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Perl vs ASP in MS IIS 4.0
Message-Id: <3638AEB1.5C806483@technologist.com>
Larry, Larry, Larry...
:-)
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Thu, 29 Oct 1998 18:26:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: pl2exe - disappearing result
Message-Id: <Pine.GSO.4.02A.9810291025390.3421-100000@user2.teleport.com>
On Thu, 29 Oct 1998, Tom Zeller wrote:
> Under NT the perl script:
>
> @ret=`c:\\winnt\\system32\\adtools\\net.exe use`;
> print @ret;
>
> works when run as a perl script (5.005). however when an exe is made
> with pl2exe, @ret has null values. Anyone know why?
Sounds like a bug in pl2exe. File a bug report with its author. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Oct 1998 17:51:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Replace pattern on multiple files?
Message-Id: <71a9ut$5u0$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
as646@FreeNet.Carleton.CA (John Robson) writes:
:I would like to do pattern matching and replacing on all files under a
:directory. No, I'm not asking people to give me the full script although
:that would be nice. I have read the FAQ. I know how to use regexp, how
:to open, write to and close file. But how do I put all of this together?
% perl -i.orig -pe 's/\bOLD\b/NEW/g' *
or
% perl -i.orig -pe 'BEGIN { @ARGV = grep {-f && -T} @ARGV }
s/\bOLD\b/NEW/g' *
--tom
--
Under no circumstances should program the way I say because I say to;
program the way you think expresses best what you're trying to accomlish
in the program. And do so consistently and ruthlesly. --Rob Pike
------------------------------
Date: 29 Oct 1998 18:06:49 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: socket connection via udp
Message-Id: <71aarp$gs8$1@pegasus.csx.cam.ac.uk>
Uri Guttman <uri@fastengines.com> wrote:
>>>>>> "SJ" == Schubert Juergen <jschubert@syskonnect.de> writes:
>
> SJ> Hi everybody I would like to create a socket connection via udp
> SJ> from a client to a server. How can I create a timeout if the
> SJ> receive from the server fail (may be the server is down)?
>
>this is not possible. connected sockets use TCP. UDP is a datagram
>protocol without connections. so which do you want?
Wrong. What do you think this line in `perldoc IO::Socket::INET'
is about?
Proto Protocol name (or number) "tcp" | "udp" | ...
> and is this a perl
>question? perl is not mentioned anywhere above.
A Perl question doesn't have to include the word "Perl". He clearly
meant "How do I do this in Perl?". And another quote from the above
pod may provide the starting point:
Timeout Timeout value for various operations
Mike Guy
------------------------------
Date: 29 Oct 1998 18:39:00 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: socket connection via udp
Message-Id: <909686309.425173@thrush.omix.com>
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
: Uri Guttman <uri@fastengines.com> wrote:
>snip<
: >this is not possible. connected sockets use TCP. UDP is a datagram
: >protocol without connections. so which do you want?
:
: Wrong. What do you think this line in `perldoc IO::Socket::INET'
: is about?
:
: Proto Protocol name (or number) "tcp" | "udp" | ...
And? This doesn't change the fact that UDP is a connection-less,
messaging protocol. You simply can not have a "UDP connection"
any more then you can have a Snail Mail "connection". At the
application layer it's an IP packet only.
>snip<
: A Perl question doesn't have to include the word "Perl". He clearly
: meant "How do I do this in Perl?". And another quote from the above
: pod may provide the starting point:
:
: Timeout Timeout value for various operations
Hmm, I'd have to double check but I don't think this affects
anything in UDP connections. alarm() or select() might be
more help.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Thu, 29 Oct 1998 18:05:00 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Why is perl better than shell scripting language?
Message-Id: <3638AE4C.2495EE2A@technologist.com>
trollin trollin trollin, rawhide...
* sung this to the Raw Hide song *
--
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Thu, 29 Oct 1998 13:29:01 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Why is perl better than shell scripting language?
Message-Id: <3638B3ED.83C5C12A@min.net>
yong wrote:
>
> Other than better regex functionality.., I think one important reason is
> that Perl error messages are much clearer. When you have an error in shell
> language, you get (e.g.) "Syntax error". That's it. But Perl says more.
Sure. And much more importantly -- I should say, of *supreme* importance --
is the fact that perl parses your entire program and validates it
before attempting to run it. Shells take the opposite approach: interpret
one line before even looking at the next. That means you could execute
50% of the way through, and then crash catastrophically. Ouch!
> Secondly, There're fewer places you have to care about white space in
> your Perl script.
Indeed, Perl is about the most flexible -- i.e. the most reasonable --
language in the world in this respect.
> IMHO, any language that requires special attention
> to spaces in source code is bad.
Heh, then let me tell you about another language that starts with P.
> There's one situation I can think of I have to use the shell language,
> that is when I want to change the environment variables of the parent
> process.
That doesn't really change the environment of the parent process;
it changes the shell's own environment. Of course, that's what you want.
The same thing works in perl; it's just that nobody (well, not many) use
perl as their shell.
--
John "Throbblefoot" Porter
Please Don't "Courtesy CC" me.
I read this newsgroup fanatically. You know that!
("Emailed only" is fine, though.)
"The people at the Grey Hotel
Are either aged or unwell." -- EG
------------------------------
Date: Thu, 29 Oct 1998 18:28:26 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Why is perl better than shell scripting language?
Message-Id: <Pine.GSO.4.02A.9810291028020.3421-100000@user2.teleport.com>
On Thu, 29 Oct 1998, yong wrote:
> There's one situation I can think of I have to use the shell language,
> that is when I want to change the environment variables of the parent
> process.
The FAQ talks about this. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 29 Oct 1998 14:42:24 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Why is perl better than shell scripting language?
Message-Id: <comdog-ya02408000R2910981442240001@news.panix.com>
tools have appropriate tasks, and can only be discussed in terms of
those tasks. perhaps you wanted to aska question like "why is Perl
better for doing X". there are certainly areas in which Perl sucks,
but that's true with anything.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 29 Oct 1998 18:45:49 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Why is perl better than shell scripting language?
Message-Id: <71ad4t$bh15@mercury.adc.com>
In article <3638B3ED.83C5C12A@min.net>, John Porter <jdporter@min.net> wrote:
>yong wrote:
>>
>> Other than better regex functionality.., I think one important reason is
>> that Perl error messages are much clearer. When you have an error in shell
>> language, you get (e.g.) "Syntax error". That's it. But Perl says more.
>
>Sure. And much more importantly -- I should say, of *supreme* importance --
>is the fact that perl parses your entire program and validates it
>before attempting to run it. Shells take the opposite approach: interpret
>one line before even looking at the next. That means you could execute
>50% of the way through, and then crash catastrophically. Ouch!
Or, worse, someone else could be running your script weeks later, hit
a code branch you didn't test, and then it crashes catastrophically on
them. This is the primary reason I switched from TCL to Perl for GUI
apps. I have to give up a few widgets, but the peace of mind is worth
it. Nothing like a syntax error in a "production" program to turn
your cheeks red.
Jeez, hope I didn't just start another language war.
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4104
**************************************