Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about the Use command

Status
Not open for further replies.

BryanY

MIS
Aug 18, 2001
54
US
Ok, i need to include a .pm file in the current working directory (not from the perl module directories).

So what would be the syntax to use?
 
check out the use lib directive

Code:
use lib qw(/usr/home/httpd/cgi-bin/mymodule);

HTH
--Paul

cigless ...
 
If you have a package called "Module" defined in "Module.pm" in the working directory, all you have to do is say "use Module;" from your script. The script's working directory is already in @INC so you don't need to add a reference to elsewhere via "use lib", though that's a great way to keep all your common code together in one place and reference it from everywhere.

________________________________________
Andrew

I work for a gift card company!
 
Yep. icrf is right.
If @INC doesnt include the current working directory and the module cant be found, perl is nice enough to tell you where your module should be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top