In your code, the first and second sub are declared at compile time. But if you want to dynamically declare a subroutine at run time, you need to wrap it up in an eval block so that that particular piece of code is evaluated only at run time.
In reply to Re^2: An Interesting Gotcha With use/require
by lestrrat
in thread An Interesting Gotcha With use/require
by periapt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |