what is the difference between require and use in perl?
Answer Posted / vinoth_bksys
The differences are many and often subtle:
* use only expects a bareword, require can take a
bareword or an expression
* use is evaluated at compile-time, require at run-time
* use implicitly calls the import method of the module
being loaded, require does not
* use excepts arguments in addition to the bareword (to
be passed to import), require does not
* use does not behave like a function (i.e can't be
called with parens, can't be used in an expression, etc),
whereas require does
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Which feature of perl provides code reusability?
How to connect to SQL server through Perl?
Is there any way to add two arrays together?
how to extract pin_code,phone_number,year from text file using regular expressions in perl
Define operators used in perl?
What does cgi program store?
You want to concatenate strings with perl. How would you do that?
Explain strftime() function in perl?
Explain the default scope of variables in perl?
What exactly is grooving and shortening of the array?
What is 'rollback' command in perl?
Why to use perl?
Explain ivalue in perl?
What does read () command do?
Perl regular expressions are greedy" what does this mean?