You'd better go with an array of anonymous subs, IMHO.
my @commands = ( sub {print "hello\n"}, sub {print "world\n"} ); foreach my $command (@commands) { &{$command}; }
In reply to Re: Interpret array elements as actual Perl?
by calin
in thread Interpret array elements as actual Perl?
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |