in reply to Multiplying together the numers in an array
use List::Util qw[ reduce ]; my @a = 2..6; print reduce{ $a*=$b } @a; 720
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Multiplying together the numers in an array
by Anomynous Monk (Scribe) on Apr 09, 2004 at 01:26 UTC | |
by BrowserUk (Patriarch) on Apr 09, 2004 at 02:08 UTC | |
by cyocum (Curate) on Apr 09, 2004 at 14:49 UTC | |
by Anomynous Monk (Scribe) on Apr 09, 2004 at 19:39 UTC |