my @fn_refs = map {sub { print "$_\n"}} qw(foo bar baz); for (@fn_refs) { $_->(); }