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
Demonstrate subroutines in perl with a simple example.
What are prefix dereferencer? List them.
How do you you check the return code of a command in perl?
What are arrays in perl?
What is the peculiarity of returning values by subroutines in perl?
How many ways can we express string in Perl?
What is the use of –w?
what are the steps involved in reading a cgi script on the server?
Explain perl. When do you use perl for programming?
What package you use to create a windows services?
How to close a file in perl?
What is the use of command “use strict”?
Define dynamic scoping.
What is the difference between perl list and perl array?
Write a program to show the process of spawning a child process