in reply to [10057] socket is not connected error msg
A little more heavyweight than 'gethostbyaddr' but if the worst comes to it, then Net::DNS gives error messages for troubleshooting.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"; } }
|
|---|