in reply to Re: A better (ie.more concise) way to write this?
in thread A better (ie.more concise) way to write this?
I'd do it like this:@a = map { ++$_ % 10 } @a;
That pretty much defeats the purpose. Instead of:
$things{ $thing }{$someotherkey}[$someindex]{$somekey}[ $_ ] = $things +{ $thing }{$someotherkey}[$someindex]{$somekey}[ $_ ] + 1 % 10 for 1 +.. 10;
You get:
@{ $things{ $thing }{$someotherkey}[$someindex]{$somekey} }[ 1 .. 10 ] + = map{ ++$_ % 10 } @{ $things{ $thing }{$someotherkey}[$someindex]{$ +somekey} }[ 1 .. 10 ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A better (ie.more concise) way to write this?
by Laurent_R (Canon) on Dec 13, 2013 at 18:55 UTC |