sub foo { print "in foo()\n"; } my $func_name = "foo"; &{\&{$func_name}}(); __output__ in foo()