in reply to
Add a list of numbers together
the recursion is interesting, but i would probably do it like so:
sub add { my $sum; $sum += $_ for @_; $sum }
update:
separated declaration of $sum from for loop after reading
ZZamboni
's observations.
Comment on
RE: Add a list of numbers together
Download
Code
In Section
Cool Uses for Perl