in reply to Re: Common Perl Idioms
in thread Common Perl Idioms
Your slurp:
@files = { local(@ARGV, $/) = @filenames; <> }; # missing 'do'
Should actually be:
@files = do { local(@ARGV, $/) = @filenames; <> };
And your index hash:
@foo{ @foo } = 0 .. @foo; # off-by-one error
Should be:
@foo{ @foo } = 0 .. $#foo;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Common Perl Idioms
by Anonymous Monk on Jul 23, 2004 at 23:21 UTC |
In Section
Meditations