#/usr/bin/perl -w use warnings; use strict; use lib qw(/home/public_html/lib/); use CGI::Carp 'fatalsToBrowser'; use Net::DNS; use POSIX; use CGI; use CGI qw(:standard); print header, start_html; my $rr; my $res = Net::DNS::Resolver->new; my $query = $res->query("http://www.yahoo.com", "NS"); if ($query) { foreach $rr ($query->answer) { next unless $rr->type eq "NS"; print $rr->nsdname, "\n"; } } else { print "query failed: ", $res->errorstring, "\n"; }
In reply to Premature End of Script Headers by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |