Explain the difference between use and require?

Answer Posted / kush

Use :

1. The method is used only for the modules(only to include
.pm type file)

2. The included objects are varified at the time of compilation.

3. No Need to give file extension.

Require:

1. The method is used for both libraries and modules.

2. The included objects are varified at the run time.

3. Need to give file Extension.

Is This Answer Correct ?    38 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is perl a case sensitive language?

890


What are numeric operators in perl?

760


Explain tk?

721


What is warn function in perl?

741


Is perl compiler or interpreter?

751


In CPAN module, name an instance you use.

751


What is a perl references?

716


Does Perl have objects? If yes, then does it force you to use objects? If no, then why?

774


How can you use Perl warnings and what is the importance to use them?

772


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.

2010


Explain the meaning of subroutine?

746


Explain chomp, chop, cpan, tk.

744


What are the reasons that cookie server can’t handle multiple connections?

771


How can you replace the characters from a string and save the number of replacements?

725


what are the strategies followed for multiple form interaction in cgi programs?

705