http://www.perlmonks.org?node_id=421334

himanh has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am the newest user in the PERL world. I hope that i will learn somethings from the Monks. My problem is simple, i have a list of domains in a text file on my server and i want to know each domains nameservers. Basically checking if any of my domains are transferred or still with me. I started with a small script i found on PM as below ::
#!/usr/local/bin/perl use Net::Whois::IP qw(whoisip_query); use strict; my $ip = "www.yahoo.com"; my $tt = 0; my @tyy; my $response = whoisip_query($ip); foreach (sort keys(%{$response}) ) { print "$_ $response->{$_} \n"; $tyy[$tt] = "$_ $response->{$_} \n"; $tt++; }
I thought this will give me all the WHOIS data of yahoo.com but it came with this ::
"The specified CGI application misbehaved by not returning a complete +set of HTTP headers."
Can someone tell me why it is happening ? And if someone can help me with my actual problem of getting nameservers of domains that are in the text file with one domain in each line. Thanks.