in reply to How strict?
in thread Command line to array
This ensures that $func can't go wild and execute metafunctions that aren't part of the plan. And this does work under use strict.my %table = ( fred => \&fred, barney => \&barney, betty => \&betty, wilma => \&wilma, ); ... my $func = "betty"; $table{$func}->(@args); # call betty(@args);
-- Randal L. Schwartz, Perl hacker
|
|---|