in reply to mutliplying each element of a list by the same number

You could use grep and map.

use strict; use warnings; my $max = shift; my @rl = ( 0 .. $max ); my @ml = map { $_ * 10 } grep { $_ } @rl; print qq{$_\n} for @ml;

Cheers,

JohnGG