Your skill will accomplish what the force of many cannot |
|
PerlMonks |
(dkubb) Re: (2) golfing hash slices (dkubb = 30)by dkubb (Deacon) |
on Apr 13, 2001 at 10:21 UTC ( [id://72301]=note: print w/replies, xml ) | Need Help?? |
You can drop the round brackets arount the <>, as we all use the $. (input line number variable) instead of @entries: @{$entries[$.-2]}{@fieldnames}=split','while<>; #47 charactersOf course, shortening the variable names would also reduce the size of this: @{$e[@e]}{@f}=split','while<>; #30 charactersIn which case it is shorter to use the @e array size rather than $.
In Section
Seekers of Perl Wisdom
|
|