sub sum { \my @a = shift; my $total = 0; $total += $a[ $_ ] for 0 .. $#a; return $total; }