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


Please Help Members By Posting Answers For Below Questions

Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

691


What is the peculiarity of returning values by subroutines in perl?

488


Explain 'grep' function.

544


Explain the difference between "my" and "local" variable scope declarations. ?

565


What is the difference between perl array and perl hash?

524






How to know whether a key exists or not in perl?

546


Which functions in perl allows you to include a module file. State their differences.

534


What is the difference between exec and system?

563


In Perl, what is grep function used for?

537


Mention the difference between die and exit in Perl?

661


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

622


What are some common methods to all handles in perl?

510


List the data types that Perl can handle?

582


What is confess function in perl?

547


What are the two ways to get private values inside a subroutine?

456