This is not meant as advice, just an option. The no strict refs approach JavaFan showed has always bothered me. This works without turning strict off. It has no other advantage I can think of though and might be harder to follow for some devs. Hence, not advice, just discussion.
use strict; my $func_ref = \&{'function1'}; $func_ref->( 1 .. 3 ); # Or... &$func_ref( 1 .. 3 ); sub function1{ print "I gots: ", join("+", @_), $/ }
In reply to Re: Access functions by name
by Your Mother
in thread Access functions by name
by shmf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |