in reply to Re: Product of a list of numbers?
in thread Product of a list of numbers?
For anyone wishing to do this now, note that since version 1.35 (October 2013) List::Util has had a product function to perform precisely this task.
#!/usr/bin/env perl use strict; use warnings; use List::Util 1.35 'product'; my @a = (1, 2, 3, 4, 5); print product @a;
🦛
|
|---|