in reply to Functions in Perl

Just a few general style comments. First, get into the habit of starting your programs with:
use strict;
at least until you understand when not to use it. I have not seen Lemay's book, but I trust it has a good explanation of use strict -- if not, discard it immediately. Second, drop the awful Perl-4 style:
&initarg;
function calling syntax and use the modern style:
initarg();
Third, lexicals are good. So replace:
foreach $i (@_) {
with:
foreach my $i (@_) {
Again, I trust Lemay describes why lexicals should generally be preferred to globals. Like the others, I recommend switching to learning perl. See merlyn's blog entry for an interesting example of a Perl beginner learning Perl in public from merlyn's excellent introductory work.

Replies are listed 'Best First'.
Re: Re: Functions in Perl
by bluethundr (Pilgrim) on May 23, 2004 at 02:56 UTC
    Interesting. Thanks! This is all good stuff! And I respect what merlyn has to say. Tremendously so! But don't particularly agree with that blog entry you pointed me to.

    But again, I value your input.
      I don't think he meant to imply it was in any way self-demeaning to publicize one's learning process, simply that it was interesting that someone would take the time to document and publish that experience on the net. Although, in regard to blog entries, that's actually pretty common.

      Roses are red, violets are blue. All my base, are belong to you.