use statements are run at compile time, in an implicit BEGIN block. They are run wherever they appear in your code, irrespective of whether they appear (as in your case) in conditional statements.
Instead, use require, which is evaluated only at run time. Wrap it in an eval and test $@ to check whether the require succeeded.
In reply to Re: Need help in dynamically loading a module
by philipbailey
in thread Need help in dynamically loading a module
by Sri Harsha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |