my $hostname = gethostbyaddr(...) or "Can't resolve $data[$ip_address_pos]: $!\n";
This may not be pertinent, but I notice you use $! in your error message. However, gethostbyaddr sez:
For the *gethost*()* functions, if the "h_errno" variable is supported in C, it will be returned to you via $? if the function call fails.(Note $? versus $!)
Update: Actually, I can't seem to get gethostbyaddr to link usefully, so see
perldoc -f gethostbyaddr
from your friendly local command line.
Give a man a fish: <%-{-{-{-<
In reply to Re: Forgot variable syntax for $var = funct() or "Funct failed\n";
by AnomalousMonk
in thread Forgot variable syntax for $var = funct() or "Funct failed\n" / Any experience with is_hostname()
by vlturner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |