use strict; use warnings; sub foo { print "foo\n"; } sub bar { print "bar\n"; } my $var = 'foo'; no strict 'refs'; &$var; ## <-