... what I would really like is to map a string to the code reference of the function itself ...
If you mean an arbitrary string, the following is one way.
>perl -wMstrict -le "my %f_map = ( glue => \&foo, ); ;; print $f_map{glue}->('hoo'); ;; sub foo { return 'FOO' . $_[0]; } " FOOhoo
In reply to Re: How to map function name to coderef?
by AnomalousMonk
in thread How to map function name to coderef?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |