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 }In reply to Re^3: A better (ie.more concise) way to write this?
by greengaroo
in thread A better (ie.more concise) way to write this?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |