use Net::Whois::RIPE::Object; $object = new Net::Whois::RIPE::Object; $object->debug(1); while ($line = $whois_socket->get()) { ($attribute,$value) = ($line =~ /^(.+?):\s+(.+)$/); next unless $attribute; $object->add($attribute,$value); } $object->success || die; foreach $attribute ($object->attributes()) { foreach $value ($object->$attribute()) { printf "%s: %-s\n", $attribute, $value; } } print $object->content; # raw content from whois server