in reply to Perl Context - concatenation operator
perl -le '$lo = 127.0.0.1; $l = (gethostbyname("localhost"))[4];print +"yup" if $lo eq $l' yup
Anyways, it's a packed structure of bytes. To get back what you expected, use the %v format directive of sprintf:
perl -le 'printf "%vd\n", (gethostbyname("localhost"))[4]' 127.0.0.1
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|