sub _sum { my $total = 0; return (map $total += $_, @hash{'foo', 'bar', 'baz'})[-1]; }