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
What are the arguments and what do they mean in perl programming?
What are the steps involved when the cgi program starts running?
Differentiate between use and require, my and local, for and foreach and exec and system
How we can navigate the xml documents?
Explain ivalue?
Explain perl. When do you use perl for programming?
What does -> symbol indicates in Perl?
What does this symbol mean '->'?
What are hashes?
Which functions in perl allows you to include a module file. State their differences.
How many loop control keywords are there in perl?
How many types of variable in perl?
How to read from a pipeline with Perl
What is perl scripting?
How to start perl in interactive mode?