use strict; use warnings; sub twice { 2 * $_[0] } my @a = map twice, 1..3; print "@a\n";