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

Explain the meaning of closure in perl.

0 Answers  


What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?

0 Answers  


What is the importance of perl warnings? How do you turn them on?

0 Answers  


Distinguish my and local?

0 Answers  


Which functions in perl allows you to include a module file. State their differences.

0 Answers  






What are the logical operators used for small scale operations?

0 Answers  


Show the use of sockets for the server and client side of a conversation?

0 Answers  


what is the difference between java and cgi?

0 Answers  


What are the steps involved when the cgi program starts running?

0 Answers  


What are perl strings?

0 Answers  


Explain substr function in perl?

0 Answers  


What are different data types that perl supports. Elaborate on them.

0 Answers  


Categories