use strict; use warnings; sub f{ return $_[0] + 1 }; my @a = (1, 2, 3); print join " ", map (f($_), @a);