use warnings; my $ref = "foo"; no strict("refs"); #bad idea &$ref; #works, as strict is turned off for refs use strict("refs"); #good idea &$ref; #don't work any more sub foo { print "foo called once\n"; }