http://qs321.pair.com?node_id=963031


in reply to Sub ref from string without eval

#!/usr/bin/perl use strict; use warnings; # install within block to temporarily # turn off strict refs { no strict 'refs'; *{'Foo'} = sub { print "Hello, world!\n"; }; } my $foo = \&Foo();

EDIT: Forgot about strict 'refs'