Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Better to use 'require' than 'do'

by C-Keen (Monk)
on Oct 01, 2001 at 15:25 UTC ( [id://115823]=note: print w/replies, xml ) Need Help??


in reply to Saving compile time by running subroutines as separate files with 'do'

It just does not look bad, it is bad under some conditions. As long as you are not using the do statement in a loop construct you should be fine.
But to make you feel better you should use require instead, which provides you with some error checking too!

So long,
C-Keen

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-20 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found