http://www.perlmonks.org?node_id=935354


in reply to no strict refs for blocks?

The use strict 'refs'; is unneeded, because strict. Apart from that, it seems to do what you want: when strict refs are disabled, &$routine_name() calls the sub with name $routine_name:

$ perl -Mstrict -wE 'sub f { say "f" }; my $x = "f"; { no strict "refs +"; &$x() }; &$x()' f Can't use string ("f") as a subroutine ref while "strict refs" in use +at -e line 1.