<br><font size=2><tt>Well, here's my $0.02. </tt></font>
<br>
<br><font size=2><tt>I would recommend caution regarding the trashing of
Perl. One thing I've been very impressed with on this list (and other
segments of the Python community) is the _fairly_ cordial relationship
between the supporters of the two languages. Contrast that to a lot
of PHP literature I've seen, which doesn't even acknowledge that Perl exists.
My theory is that many who use PHP got kicked around by trying to
learn Perl, and bitterness set in. But that's a digression... Anyway,
I'm on the fence as to whether I want to learn Python (not exactly a "core
competency" for statisticians, but I do line the numerical computation
capabilities which look _much_ better than those of Perl), and I wouldn't
want this negativity to push me (or others) away.</tt></font>
<br>
<br><font size=2><tt>I'll try to speak to a few of the points below, from
my limited experience:</tt></font>
<br><font size=2><tt><br>
<br>
> Had the *ahem* joy of learning Perl last night. Egad. Wrote the script<br>
> in Python to get it right, and then 'translated' it to Perl. Does
the<br>
> style of coding Python engenders suit the Perl environment in anyone's<br>
> experienc? AFAI can see there is no real 'style' to Perl, apart from<br>
> white noise of non alphanumeric characters.<br>
</tt></font>
<br><font size=2><tt>Actually, because there is "more than one way
to do it", you can impose any style you want on your code, and (in
my opinion) the onus _should_ be on the user to use "proper"
style, however you want to define that. As Larry Wall says in the
excellent "Natural Language Principals in Perl", "It's officially
okay in the Perl realm to program in the subset of Perl corresponding to
sed, or awk, or C, or shell, or BASIC, or Lisp or Python".</tt></font>
<br><font size=2><tt> <br>
> 1) I'll use Perl for the regex stuff from now on, Perl is obviously<br>
> built for this.<br>
</tt></font>
<br><font size=2><tt>No tool is better than Perl for that, IMO.</tt></font>
<br><font size=2><tt> <br>
> 2 ) There's More Than One Way To Do It makes debugging hard - i.e.
<br>
> close INFILE; & close (INFILE); are both valid. I like one syntax,
cos<br>
> it's easier to remember.<br>
</tt></font>
<br><font size=2><tt>Many people see "there's more than one way to
do it" as a good thing.</tt></font>
<br><font size=2><tt> <br>
> 3) Some stuff is counter-intuitive - <br>
> $lenOfModList = @moddirList is the Perl equivalent of lenofModList
=<br>
> len(moddirList)<br>
> @someArray = (@someArray, $newValue) is the same as someArray.append(newValue)<br>
</tt></font>
<br><font size=2><tt>It's only counter-intuitive if you don't know the
language. Once you know the language, it's very intuitive. One
could say that the theory of relativity is counter-intuitive, but to a
physicist (or even anyone else who's thought about it for a while) it _is_
intuitive. It's all about context and perspective. Speaking
of context, once you understand the concept of "context" in Perl,
the statements above are very intuitive -- and elegant -- in my opinion.</tt></font>
<br>
<br><font size=2><tt><br>
> Also, why doesn't if ( not $d eq "a" && not $d eq
"c") evaluate to<br>
> true for $d = "b" when<br>
> if (not $d eq "a") evals to true and if ($d ne "a"
&& $d ne "c") evals<br>
> true also? What's with that?<br>
</tt></font>
<br><font size=2><tt>Must be an order-of-operations or logic thing, and
I can assure you -- without even looking at it much -- that the problem
isn't Perl's.</tt></font>
<br><font size=2><tt> <br>
> 4) WHAT IS WITH THE STUPID SYMBOLS EVERYWHERE LARRY??!!<br>
> <br>
> I'm not referring to the $ & @, I can see how they could be useful,<br>
> although with a list -<br>
> <br>
> @dude = (1, 2, 3), to obtain the 2nd value I would expect $d = @dude[1],
<br>
> not $d = $dude[1], that's counterintuitive also. <br>
</tt></font>
<br><font size=2><tt>The definition of "counterintuitive" is
based on context. That stuff is very intuitive when you understand
the language.</tt></font>
<br><font size=2><tt> <br>
> Oh, no, what I'm referring to is stuff like @_, and @!, and @indexFile<br>
> = <INFILE> to read a whole file, and this - I hate Perl for
this -<br>
> open OUTFILE, ">c:/python23/j/index.htm"<br>
<br>
> What's the difference between<br>
> open OUTFILE, "c:/python23/j/index.htm" and<br>
> open OUTFILE, ">c:/python23/j/index.htm" ?<br>
> <br>
> The first will open index.htm with the handle OUTFILE, to read...
<br>
> The second will open index.htm with the handle OUTFILE to write!.<br>
</tt></font>
<br><font size=2><tt>So? That's the syntax of the language. I don't
know why that would be bothersome...</tt></font>
<br><font size=2><tt> <br>
> Of course, the documentation I had didn't mention that. It just said<br>
> to open it and use<br>
> print FILEHANDLE $value; to write. Oh no, I had to find a CGI Perl<br>
> tutorial, which mentioned using &lst; to open and &gst; to
write (or<br>
> something), which I guessed as lesser/greater than.<br>
> <br>
> Why is the read/write modifier part of the filename??? Why is it a
> ?<br>
> In my opinion, there's only one place a > sign should be, in an<br>
> inequality test.<br>
</tt></font>
<br>
<br><font size=2 face="sans-serif"><br>
Nicholas Montpetit<br>
Deluxe Business Services<br>
651-787-1008</font>