No such thing as a small change | |
PerlMonks |
Re: Simplifying for loop and applying multiple push functionby davido (Cardinal) |
on Dec 14, 2005 at 21:16 UTC ( [id://516766]=note: print w/replies, xml ) | Need Help?? |
Just because someone said it can't be done in one line, I had to try:
Turns out you can do it in one with a slice. Roy_Johnson's approach deserves a ++ though, since it is actually legible. :) Dave
In Section
Seekers of Perl Wisdom
|
|