Why we use "use lib $path"?



Why we use "use lib $path"?..

Answer / 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

More CGI Perl Interview Questions

Mention what is cpan?

0 Answers  


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

0 Answers  


What are the arguments and what do they mean in perl programming?

0 Answers  


How do you set environment variables in perl?

0 Answers  


You want to connect to sql server through perl. How would you do that?

0 Answers  






When do you use perl programming?

0 Answers  


You want to download the contents of a url with perl. How would you do that?

0 Answers  


Differentiate between arrays and list in perl.

0 Answers  


Explain the functioning of conditional structures in perl.

0 Answers  


How to deleting an existing file in perl programming?

0 Answers  


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

0 Answers  


Explain ivalue in perl?

0 Answers  


Categories