http://qs321.pair.com?node_id=949710

jaldama has asked for the wisdom of the Perl Monks concerning the following question:

Just using warnings, I get this Undefined subroutine &main::inet_aton called at dnscheck.pl line 15. When I add in use strict; I get
Global symbol "%dns_check" requires explicit package name at dnscheck. +pl line 7. Global symbol "$key" requires explicit package name at dnscheck.pl lin +e 13. Global symbol "$value" requires explicit package name at dnscheck.pl l +ine 13. Global symbol "%dns_check" requires explicit package name at dnscheck. +pl line 13. Global symbol "$key" requires explicit package name at dnscheck.pl lin +e 14. Global symbol "$key" requires explicit package name at dnscheck.pl lin +e 15.
This is the code so far:
%dns_check = ("address" => "ip"); while ( ($key, $value) = each %dns_check) { $found_addr = gethostbyname($key) or die "Error $!\n"; $found_addr = inet_ntoa(inet_aton($key)); print "IP found is: $found_addr ", "\n"; }
- Confused