in reply to Functions in Perl
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:use strict;
function calling syntax and use the modern style:&initarg;
Third, lexicals are good. So replace:initarg();
with:foreach $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.foreach my $i (@_) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Functions in Perl
by bluethundr (Pilgrim) on May 23, 2004 at 02:56 UTC | |
by fluxion (Monk) on May 23, 2004 at 06:04 UTC |