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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net::WHOIS

Status
Not open for further replies.

jbga35

Technical User
May 16, 2003
3
CA
I don't have access to the PERL folder on my host server and I don't want to bother him with reloading the file while I trouble shoot why the .ca query isn't working for my WhoIs script.

Can someone tell me how to access the whois.pm if I put it into my cgi-bin? Presently my script uses:

-> use Net::XWhois;

How do I change this to read the file from my cgi-bin?

Thanks for any help, Jeanne
 
Hi Jeanne,

I've wondered about this myself so I searched through the perl docs and found that this seems to work..

install the module to your cgi-bin directory, or create a subdirectory under cgi-bin called "Net" and put XWhois.pm in it. I assume you'll need to install any dependencies if there are any.

in your script -
Code:
use lib "path/to/cgi-bin";
use Net::XWhois;
I tried it with File::Copy and it worked.. I'm on a windows system, but I think it should work the same on other platforms

it seems that 'use lib' adds the path to @INC which contains all paths that perl checks for modules.
I hope I got this right.. good luck!
-J
 
- I missed a slash in there..

use lib "path/to/cgi-bin";
should read:
use lib "/path/to/cgi-bin";

 
Thanks Chazoid! That did the job!
Jeanne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top