Paladin is probably right about the quotes. On a more general note, rather than using the eval to create the sub on the fly you might consider assigning a CODEREF to the '*get_text' typeglob:
This is possibly a little clearer than the 'eval' ins some cases.*get_text = sub { # ... };
/J\
In reply to Re: defining functions at runtime
by gellyfish
in thread defining functions at runtime
by batkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |