in reply to hex(unpack("H*")) help?!?!
If it's in little-endian order, do this:$number = unpack("n", $string);
If it's in the order for the machine your perl is running on, you can do this:$number = unpack("v", $string);
Or use a little 's' if you want signed data.$number = unpack("S", $string);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: hex(unpack("H*")) help?!?!
by jettero (Monsignor) on Oct 31, 2002 at 17:17 UTC |