in reply to Re^2: A better (ie.more concise) way to write this?
in thread A better (ie.more concise) way to write this?
Why not this:
for ( @a ) { ++$_; $_ %= 10 }And if you really want to process only the first 10, you can still use the slice:
for ( @a[0..9] ) { ++$_; $_ %= 10 }
|
|---|