but don't do that. It will complain (as well it should) under use strict;
Use a dispatch table instead:
use strict; sub func { print "func ran\n"; } my %dispatch = ( func => \&func ); my $var = 'func'; &{$dispatch{$var}}();
In reply to Re: calling functions from data in variables
by ctilmes
in thread calling functions from data in variables
by glytchbinary
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |