Hello squimby, and welcome to the Monastery!
Any tips for 'Perl'ifying this?
Building on NetWallah’s answer:
sub total { my $sum = shift; $sum += $_ for @_; return $sum; }
See shift and Statement Modifiers.
Update: Also read-up on $_ in General Variables.
Hope that helps,
Athanasius <°(((>< contra mundum
In reply to Re: Rookie question
by Athanasius
in thread Rook question
by squimby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |