mosh has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to convert ip address: 1.1.1.9 to 01 01 01 09.
How do I convert it with the assistance of PACK command ?
I tried to do it with 'H8':
$new = pack ('ncH8n',$x, $y, $ip, $z)
What I got in the ip section is: 11 19 00 00
Any ideas ?
Mosh.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pack command
by Limbic~Region (Chancellor) on Apr 18, 2005 at 13:51 UTC | |
by mosh (Scribe) on Apr 18, 2005 at 14:06 UTC | |
|
Re: Pack command
by BrowserUk (Patriarch) on Apr 18, 2005 at 14:15 UTC | |
|
Re: Pack command
by tlm (Prior) on Apr 19, 2005 at 03:15 UTC |