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

What does `$result = f() .. g()' really return?

784


Explain use of ‘my’ keyword in perl?

735


How to convert strings into an array in perl?

728


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

756


What is lexical variable in perl?

704


Is there any way to add two arrays together?

750


What are stdin, stdout and stderr?

702


What is automatic error handling in perl?

731


How many types of operators are used in the Perl?

785


Is perl a case sensitive language?

871


Explain a tell function in perl?

767


How to read a single line from a file in perl?

749


What are the various file operations in perl. Explain with example.

721


What rules must be followed by modules in perl.

752


List the files in current directory sorted by size ?

692