Funkster has asked for the wisdom of the Perl Monks concerning the following question:
which gives the infamous output of:use Socket; #================================================================= $var=0x0a0a0a01; #simulate the value from the database printf(STDERR "DEBUG, var is %4.4x \n", $var); print STDERR "DEBUG, var is $var\n"; $peer_addr = inet_ntoa($var); print "DEBUG, $peer_addr";
9. Hmmm is it relevant that that is the number of digits in the "print" value.. is it being stored in some format other than integer?DEBUG, var is a0a0a01 DEBUG, var is 168430081 Bad arg length for Socket::inet_ntoa, length is 9, should be 4
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: inet_ntoa question
by esskar (Deacon) on Mar 04, 2004 at 20:46 UTC | |
|
Re: inet_ntoa question
by Paladin (Vicar) on Mar 04, 2004 at 20:50 UTC | |
by Funkster (Initiate) on Mar 04, 2004 at 23:52 UTC |