Don't ask to ask, just ask | |
PerlMonks |
Re^2: A better (ie.more concise) way to write this?by Anonymous Monk |
on Dec 13, 2013 at 17:35 UTC ( [id://1067051]=note: print w/replies, xml ) | Need Help?? |
Watch out, because @b = map { ++$_ % 10 } @a;modifies both @a and @b. You can also do something like this: $_ = ($_+1) % 10 for @a[3..7];
In Section
Seekers of Perl Wisdom
|
|