map { defined $_ ? $_ : () } @array; #### print join(',',map { ($_,$_*2,$_*3) } (1,5)); #prints: 1,2,3,5,10,15