Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: use and require inside subs

by JediWizard (Deacon)
on Nov 02, 2004 at 23:37 UTC ( #404782=note: print w/replies, xml ) Need Help??

in reply to use and require inside subs

Personally, I avoid ever doing a require ''. 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.

May the Force be with you

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://404782]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-08-17 19:55 GMT
Find Nodes?
    Voting Booth?

    No recent polls found