Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Whois script help

by gellyfish (Monsignor)
on Jan 11, 2005 at 17:19 UTC ( #421341=note: print w/replies, xml ) Need Help??


in reply to Whois script help

Are you running this program under the CGI? If so then yes you will get that message because you are not outputting any headers at all. You should first try to run this from the command line to see if it works, then if you want to run it as a CGI program you should add:

print "Content-Type: text/plain\n\n";
into the program somewhere before entering the foreach loop.

Of course Net::Whois::IP is not the module that you want at all because that module is designed to query for WHOIS records for IP blocks - you probably want to look at either Net::Whois or Net::Whois::Raw. For example:

#!/usr/bin/perl -wT + use strict; use CGI qw(:standard); use Net::Whois::Raw qw(whois); + print header("text/plain"); print whois('yahoo.com');

/J\

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://421341]
help
Chatterbox?
[Corion]: Do you want to wait for a key press before closing the window?
[LanX]: I want the command line in the history
[tye]: -Mouse
[Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
[LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
[Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
LanX damns the cult of CB ;-)
LanX WTF WTF WTF
[LanX]: please forget my last 3 posts
[LanX]: Yeah option a doesn't go into history

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-03-27 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.