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 perl.
What is q (single q) operator in perl?
Explain lists and ivalue?
What is perl pop array function?
What are the various uses of perl?
What is the use of '>>' in perl?
What is perl I used for?
What is it meants by '$_'?
What are scalar data and scalar variables?
Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.
What does the qq{ } operator do?
Explain subroutine?
Is there any way to add two arrays together?
What are the various flags/arguments that can be used while executing a perl program?
How to prevent file truncation in perl?