use Sub::Util qw/set_prototype/; (*Hello, *Hi) = map { set_prototype '\@\@' => $_ } map { my $var = $_; sub { $_; } } qw/Hello Hi/;