use strict; sub foo { print "bar\n" } my $func = "foo"; my $func_ref = \&{$func}; $func_ref->();