![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: gethostbyname not workingby myocom (Deacon) |
on Mar 27, 2001 at 01:59 UTC ( #67346=note: print w/replies, xml ) | Need Help?? |
As you will see in the docs, gethostbyname returns a list, the last element of which is the IP address in packed format. You'll need to unpack it first, like so:
Update: Corrected which element of gethostbyname returns the address. Update 2: Added AM's advice.
In Section
Seekers of Perl Wisdom
|
|