If it works, it's Perl.
If you still want a more Perlish way, you're throwing down the gauntlet for Perl Golf. Bad anonymous monk!.
my @items = map {$_ % 100 } @_; my $sum = 100; $sum -= $_ for @items[0..2]; $items[ $sum<0?0:2 ] += $sum unless $sum == 0;
--
Brother Frankus.
¤
In reply to Re: Not very Perlish? (note the capital P ;)
by frankus
in thread Not very perlish?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |