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.)
In reply to Re^2: mutliplying each element of a list by the same number
by almut
in thread mutliplying each element of a list by the same number
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |