use strict; sub foobar { print "hello from foobar\n" } my $sub_name = 'foobar'; { no strict 'refs'; $sub_name->(); } __END__ hello from foobar