assuming the elements are in the range 0 to 9 to start with you could also do
++$_ < 10 || ( $_ -= 10 ) for @a;
but I see that your original array has 10 as an element
In reply to Re: A better (ie.more concise) way to write this?
by wazat
in thread A better (ie.more concise) way to write this?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |