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 to renaming a file in perl programming?
What are the advantages of c over Perl?
“Perl regular expressions match the longest string possible”. What is the name of this match?
Explain lists and ivalue?
How to read a file into a hash array?
How can I display all array element in which each element will display on next line in perl ?
Explain string comparison operators in perl.
You want to empty an array. How would you do that?
What is use of ‘->’ symbol?
Create a function that is only available inside the scope where it is defined ?
How to compare two strings in perl?
List all the features of perl programming?
How to read a single line from a file in perl?
How will you get the count of parameters passed to a perl subroutine?
Explain subroutine in perl?