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 is the syntax used in Perl grep function?

608


What are the various perl data types based on the context?

546


What are the options that can be used to avoid logic errors in perl?

531


What are numeric operators in perl?

553


List the data types that Perl can handle?

587






What is the purpose of _package_ literal?

546


Explain join function in perl?

541


Comment on the scope of variables in perl.

533


What are prefix dereferencer?

516


Why do we use "use strict" in perl?

546


How will you create a file in perl?

530


Why Perl aliases are considered to be faster than references?

550


What are the different instances used in cgi overhead?

590


How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.

1805


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

573