Why we use "use lib $path"?

Answer Posted / guest

If we are trying to add a module or library files in our
program using require or use statement then it will search
that module or library files in the Perl's default search path.

The statement use lib is used to add the directories to
default search path.

So if the module or library file is not located in the
Perl's default search path then it will find the library
files in the path we have given with the use lib $path.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate use and require?

519


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

504


What is it meants by '$_'?

532


How do I pass a command line argument in perl?

548


Comment on the scope of variables in perl.

525






What does file test operators do in perl?

500


what is Chop & Chomp function does?

593


Can inheritance be used in perl? Explain with the help of an example.

502


How to implement a stack in Perl?

572


Can we load binary extension dynamically?

573


What are the different instances used in cgi overhead?

572


List the prefix dereferencer in Perl.

565


Explain about typeglobs?

551


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2000


Enlist the advantages of using c over perl?

512