You can define an AUTOLOAD sub.
It is called in place of any undefined sub and receive in the $AUTOLOAD variable the name of the sub originally invoked. You can test $AUTOLOAD to see if it matches your naming conventions (in your example /sub\d+/).
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: Dynamic Subroutines
by psini
in thread Dynamic Subroutines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |