|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Using "USE" instead of "DO" for subroutines call in external fileby Anonymous Monk |
| on May 27, 2005 at 02:50 UTC ( [id://460955]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
guru, I have a file which I call "mysub.pm". It stores *only* subroutines which are use for "mymain.pl" code. Currently the way I call it in "mymain.pl" is like this: And it works. How can I change it so that I can call it with "use" like this? I tried that code it throws the warning "Command exited with non-zero status 2". "mysub.pm" simply look like this: My second question is. Which is better using "use" or "do" to call it? Which is faster? Thanks ...
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||