#!/usr/bin/perl -w
# 
# Net::Whois::ARIN undefined / undef bug
#
# Joshua D. Abraham < jabra@spl0it.org > 
# Sun Dec 23 23:53:48 EST 2007
#
use strict;
use Net::Whois::ARIN;
my $w = Net::Whois::ARIN->new(
              host    => 'whois.arin.net',
              port    => 43,
              timeout => 30,
          );
my @output = $w->network( gethostbyname('google.com') );
foreach my $net (@output) {
      print "OrgName is " . $net->OrgName  . "\n" if ( defined($net->OrgName));
      print "NetHandle is " . $net->NetHandle . "\n" if ( defined($net->NetHandle));
      print "NetRange is " . $net->NetRange . "\n" if ( defined($net->NetRange));
      print "NameServer is " . $net->NameServer . "\n" if ( defined($net->NameServer));
}
