in reply to Re: mutliplying each element of a list by the same number
in thread mutliplying each element of a list by the same number
or
my @minutes_list = map $_*10 || (), @ratio_list;
(There's nothing at all wrong with your solution. I just wanted to point out an often overlooked feature of map ... that is, it can return a list shorter than the input list, if you have the expression evaluate to the empty list for the elements to be dropped.)
|
|---|