@numbers = (1..5); print product(@numbers),"\n"; sub product { my $result = shift; $result *= $_ for @_; $result; }
In reply to Re: Multiplying together the numers in an array
by runrig
in thread Multiplying together the numers in an array
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |