If you just want the nameservers you could use Net::DNS and ask for NS records for whatever domain.
In reply to Re: Whois script help by Fletch in thread Whois script help by himanh