in reply to [10057] socket is not connected error msg

I haven't tried your script, because OLE is a Win32 thingy and so I can't actually pick up what's wrong. But I'd recommend giving it another try with 'Net::DNS::Resolver'
use strict; use warnings; use Net::DNS; my $resolver = new Net::DNS::Resolver; my $query = $resolver -> search ( $address ); if ( $query ) { foreach my $RR ( $query -> answer ) { next unless $RR -> type eq "PTR"; print $RR -> rdatastr, "\n"; } }
A little more heavyweight than 'gethostbyaddr' but if the worst comes to it, then Net::DNS gives error messages for troubleshooting.
(the print line is there to allow testing. What you'd want to do is change that to '$gothostaddr = $RR -> rdatastr')
--
It's not pessimism if there is a worse option, it's not paranoia when they are and it's not cynicism when you're right.