#!/usr/bin/perl -wT use CGI; use Net::Whois::ARIN; my $w = Net::Whois::ARIN->new( host => 'whois.arin.net', port => 43, timeout => 30, ); print "content-type:text/html; charset=utf-8\n\n"; my $q = new CGI; my $ip = $q->param('ip'); if (!$ip){print "";}else{ my @records = $w->network($ip); foreach my $net (@records) { # print ...; } }