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
What is the difference between perl list and perl array?
Explain USE and REQUIREMENT statements?
How will you open a file in read-only mode in perl?
What is an interpolation in perl?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
Which functions in perl allows you to include a module file.
What is 'commit' command in perl?
Explain chomp, chop, cpan, tk.
How will you declare a variable in perl?
What are the various perl data types based on the context?
Explain the meaning of subroutine?
Explain returning values from subroutines?
Explain lists and ivalue?
How do I pass a command line argument in perl?
Explain the various characteristics of perl.