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
    You need to link to endservent. Makes perfect sense, right?
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,