Hi Bob

Can you ping localhost?  This is rather a brute force test but useful.
>
>   ping localhost
>
>
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.054 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.044 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.038 ms
^C
--- localhost ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.038/0.045/0.054/0.010 ms


Others ways to resolve "localhost" shows identical result, for example
"nslookup":

nslookup localhost
Server:         127.0.0.1
Address:        127.0.0.1#53
Name:   localhost
Address: 127.0.0.1

Just to make sure we are looking at the same lines could you print
> this out just to show us the lines around 432 in your file?  I am
> expecting to see this there.
>
>   $ cat -n /usr/bin/sa-update | sed -n '431,435p'
>   431 } else {
>   432   $res = Net::DNS::Resolver->new();
>   433   $res->force_v4(1)  if $have_inet4 &&
>   434                         $opt{'force_pf'} && $opt{'force_pf'} eq
> 'inet';
>   435 }


The content around line 432 in my computer is exactly as you expected:

cat -n /usr/bin/sa-update | sed -n '431,435p'
   431  } else {
   432    $res = Net::DNS::Resolver->new();
   433    $res->force_v4(1)  if $have_inet4 &&
   434                          $opt{'force_pf'} && $opt{'force_pf'} eq
'inet';
   435  }

Since I'm guess it's a problem in perl, I've made a very simple perl test
file (dns.perl):

use Net::DNS;
$resolver = new Net::DNS::Resolver();

If I execute I get same error:
perl dns.perl
unresolvable name: localhost at dns.perl line 2.

But if I execute in other computer I get no error. Both computers have the
same perl version (5.20.2).

Maybe I've a bad perl configuration? I'm known nothing about perl :(

Pablo

Reply via email to