Explain the difference between use and require?
Answer Posted / vinoth.g
The use statement works at compile time, require at run
time. So if you have a module that does a lot in a begin
block and you don't really need it in all cases, then it's
clever to "require" it there where you want to use it but
don't "use" it. So you don't have to wait for all that
initializations of that module in case you don't need it.
Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
Explain goto expr?
What happens when you return a reference to a private variable?
Explain what is lvalue?
What are some of the key features of objects in perl?
Explain string comparison operators in perl.
When does circular reference occur?
How to create a package?
Explain goto label?
What is the easiest way to download the contents of a URL with Perl?
What are arrays in perl?
Differentiate use and require?
How to read multi lines from a file in perl?
How interpreter is used in perl?
Write syntax to use grep function?
There are two types of eval statements i.e. Eval expr and eval block. Explain them.