Perl Monk, Perl Meditation | |
PerlMonks |
Re: A better (ie.more concise) way to write this?by roboticus (Chancellor) |
on Dec 13, 2013 at 17:13 UTC ( [id://1067049]=note: print w/replies, xml ) | Need Help?? |
I'd do it like this:
If I'm missing the point and you're explicitly wanting to only alter a subset of the items, a slice'll adapt it:
Update: If the point is to modify it in place, I like the AM post above... ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|