G'day tel2,
The documentation for require explains how to achieve this. See the text, about half-way down, near:
eval "require $class";
Update: Sorry, I appear to have missed the last line of your post:
"Also, if each module will always contain only 1 sub, do they need to have a sub at all? If not, how can they be written & called without a sub?"
That's not addressed in the require documentation.
Actually, I don't understand what you're asking here which appears to be "How to call a sub that doesn't exist?". Please elaborate.
— Ken
In reply to Re: Call sub in variable module
by kcott
in thread Call sub in variable module
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |