Personally, I avoid ever doing a require 'Something.pl'. If I have a subroutine in a script which I need to use in another script, I put it in a module and use it. The only time I use require to include code is when I need to dynamically include something at run time.
As I understand it, use is a compile time directive, and will have the same effect whether it is inside a subroutine that is called repeatedly, or at the top of the script or file.
In reply to Re: use and require inside subs
by JediWizard
in thread use and require inside subs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |