use strict; sub test { print 'hello world!' }; my %hash; $hash{test} = \&test; # This generates an error: &$hash{test}; # Global symbol "$hash" requires explicit package name at script.pl li +ne 7. # syntax error at script.pl line 7, near "$hash{test" # Execution of script.pl aborted due to compilation errors. # But this works: &{$hash{test}}; # why???
In reply to hash o' refs by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |