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

Explain the difference between declarations of 'my' and 'local' variable scope in perl?

498


Explain the execution of a program in perl.

500


Which feature of perl provides code reusability?

569


Explain splicing of arrays?

515


If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?

508






How do I read command-line arguments with Perl?

603


How we can navigate the xml documents?

535


What is perl? What is the basic command to print a string in perl?

480


Write a program that shows the distinction between child and parent process?

510


What's the difference between /^Foo/s and /^Foo/?

547


Explain the meaning of perl one-liner?

508


What are the various uses of perl?

524


Define say() function in perl?

537


What are perl array functions?

525


What is the use of -t?

542