Erm, because that's what use strict does. You either need to use coderefs (my %lists = ( stuff => \&test1, things => \&test2 );), or use the grandfathered goto syntax:
for my $i ( keys %lists ) { my $coderef = \&{ $i }; &{ $coderef }; }
Read perldoc strict for more details.
In reply to Re: Can't Reference a Sub by Variable when using Strict
by Fletch
in thread Can't Reference a Sub by Variable when using Strict
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |