in reply to Forgot variable syntax for $var = funct() or "Funct failed\n" / Any experience with is_hostname()
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: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Forgot variable syntax for $var = funct() or "Funct failed\n";
by choroba (Cardinal) on Jan 05, 2016 at 16:59 UTC |