Possible Duplicate:
Extraction of TLD from urls and sorting domains and subdomains for each TLD file
For example: fetching yahoo.com from the PTR record 45.36.190.206.in-addr.arpa domain name pointer ir1.fp.vip.gq1.yahoo.com.
I am using Net::Nslookup; nslookup(host => "206.190.36.45", type => "PTR"); which returns ir1.fp.vip.gq1.yahoo.com.
Need to fetch just "yahoo.com" from the ptr record.
How to fetch this using perl ?