in reply to Re: Re: Constructing 32-bit hexadecimal integers
in thread Constructing 32-bit hexadecimal integers

Nah, use unpack at will.

You will have to pad them missing values:

$a = "\001"; #just another hex string $a = ("\000" x (4-length($a))).$a; #Zero pad that string print unpack 'L', $a; #Hey, that's one!

Jeroen
"We are not alone"(FZ)

Replies are listed 'Best First'.
(tye)Re: Constructing 32-bit hexadecimal integers
by tye (Sage) on Apr 12, 2001 at 00:54 UTC

    Well, it is either 1 or 0x01000000, depending on your platform. Use 'N' or 'V' in place of 'L' if you want to use big- or little-endian format (respectively) regardless of your current platform.

            - tye (but my friends call me "Tye")