Problems with Net::Whois on Windows
I'm using a script from Programming Perl (O'Reilly) that uses whois to retrieve information from the InterNIC (section 18.8 if anyone has the actual book). The code is as follows (I modified it from the book to work with Windows):
Code:
#!C:/perl/bin/perl -wTuse strict;
use Net::Whois;print "Content-type: text/html\n\n";
my $whois = Net::Whois::Domain->new("perl.org") or die "Can't get whois information for perl.org\n";
print "The domain is called $whois->domain\n";
However, I just get a blank page displayed in my browser. I have installed the Net-Whois module using ppm and it's definitely working in that sense. I found that I could insert a print statement before the my $whois... line, so I presume that is what is causing the problem. Anything done after that line doesn't appear to have any effect whatsoever, yet the die statement isn't coming into effect either.
I'm running the following software:
Apache/2.0.47 (Win32)
ActiveState Perl 5.8.1 build 807
Mozilla 1.6 (tested in IE6 as well just to ensure it isn't some stupid browser problem)
All my other CGI scripts run without problems, so it's not as if I've not configured Apache correctly or anything like that. I've set up Apache so that it can execute CGI scripts in any directory under document root, because it's only a test server running on my local machine.
Does anyone have any ideas on how to fix this problem, because I'm totally lost as to what could possibly be the problem? Thanks in advance.
___________________
...
