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

We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2163


Differentiate use and require?

683


Explain what is lvalue?

751


How to sort arrays in perl?

797


Explain perl.

709


What are stdin, stdout and stderr?

679


Explain ivalue in perl?

696


What are the logical operators used for small scale operations?

716


Which feature of perl provides code reusability?

742


Explain goto name?

692


you are required to replace a char in a string and store the number of replacements. How would you do that?

680


What is perl dbi?

642


What are the functions that can be performed using cgi program?

659


How to open and read data files with Perl

807


How do I print the entire contents of an array with Perl?

725