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
How will you get the count of parameters passed to a perl subroutine?
When do you use perl programming?
What is a perl references?
How do I read command-line arguments with Perl?
What can be done for efficient parameter passing in perl?
What is the difference between perl list and perl array?
What is cpan ? What are the modules coming under this?
“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?
what is Polymorphism in Perl?
What is perl unshift array function?
What does init 5 and init 0 do?
What is chomp() operator/function?
What does a die() function do in perl?
What are the different string manipulation operators in perl?
How does polymorphism work in perl?