http://www.perlmonks.org?node_id=181258


in reply to Re: Random Tips on Parse::RecDescent
in thread Random Tips on Parse::RecDescent

Ok, I'll bite...
#!/perl/bin/perl # # coderefs.pl -- Yes you can use strict... use strict; use warnings; use diagnostics; for (qw(foo bar)) { ($main::{$_} or sub { print "No such sub: $_\n" })->(); } $_ = 'baz'; $main::{$_}(); # works! but, &{$_}(); # doesn't... sub foo { print "Yes, I'm here.\n"; } sub baz { print "I'm here as well.\n"; } __END__
So my question is why?

–hsm

"Never try to teach a pig to sing…it wastes your time and it annoys the pig."