If you know which package you expect your subroutine to be in you might also be able to use the functionality of UNIVERSAL::can
use strict; use warnings; sub Foo { warn 'foo'} my $x = 'Foo'; my $sub_ref = main->can($x); $sub_ref->();
In reply to Re: Sub ref from string without eval
by Anonymous Monk
in thread Sub ref from string without eval
by lackita
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |