in reply to Re: A better (ie.more concise) way to write this?
in thread A better (ie.more concise) way to write this?
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];
|
|---|