Or, perhaps, is there a neater WTDI with a nearly-one-liner like this (ie, other than your generic for-loop)?sub _sum { my $total = 0; return (map $total += $_, @hash{'foo', 'bar', 'baz'})[-1]; }
Thx in advance...
In reply to sum function by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |