what is the difference between require and use in perl?
Answer Posted / jayakumar.b
use:
* Object Verification will happen @ Compile Time.
* File will have extention of .pm
* Module location will be set by @ISA Variable.
require:
* Object Verification will happen @ Run TIme.
* Method can be used from and .pm or .pl file.
* Absolute path to be given, if file located in different
dir.
Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?
What is the peculiarity of returning values by subroutines in perl?
Explain 'grep' function.
Explain the difference between "my" and "local" variable scope declarations. ?
What is the difference between perl array and perl hash?
How to know whether a key exists or not in perl?
Which functions in perl allows you to include a module file. State their differences.
What is the difference between exec and system?
In Perl, what is grep function used for?
Mention the difference between die and exit in Perl?
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)
What are some common methods to all handles in perl?
List the data types that Perl can handle?
What is confess function in perl?
What are the two ways to get private values inside a subroutine?