print "Starting DNS lookup on $ip ..."; my $h=gethost($ip); print "here?"; ###<-- This is printed $ripname{$ip}=$h->name; print "Or here?"; ### <-- This is never printed if (length($ripname{$ip})<3) {$ripname{$ip}='FAILED'}; print "done, hostname for $ip is $ripname{$ip} !\n"; ####<- +-- Neither is this
The code is in the else part of an if statement, it seems that when gethost is called, it ends the if statement. Normal program flow then resumes.
I went back to using gethostbyaddr, which is failing to resolve anything. It appears perl is not picking up my nameserver settings. Regardless, gethost should be failing politely, not shredding the rest of the block.
Summary of my perl5 (revision 5 version 6 subversion 0) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread Build: 620
TIA
____________________
Jeremy
I didn't believe in evil until I dated it.
In reply to gethost from Net::Hostent fails strangely by jepri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |