in reply to variable reference to subroutine while "strict"
my $sub_name = 'this'; my $x = do { no strict 'refs'; \&$sub_name }; print $x->(), "\n"; sub this { return "hi"; }
Note that I kept the scope small in which I used the no strict "refs"; to prevent damage from unwanted symbolic dereferentition.
|
|---|