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

What are perl strings?

504


You want to read command-line arguements with perl. How would you do that?

496


Write syntax to use grep function?

550


Explain perl. When do you use perl for programming?

444


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

530






You want to concatenate strings with perl. How would you do that?

472


Explain the arguments for perl interpreter.

522


What is the closure in PERL?

566


What is eval function in perl?

543


What does the q{ } operator do?

511


Is there any way to add two arrays together?

567


How do find the length of an array?

516


What $! In perl?

524


How many types of primary data structures in Perl and what do they mean?

843


What is the usage of -i and 0s options?

542