in reply to Not very perlish?

As a wearer of size eleven paratrooper boots, I think elegance is over rated. As cranky Perl coder, my philostophy is this:
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.

¤