It was brought to my attention that despite your use of singular, the hex string should contain 4 numbers. That makes more sense, but your input is still messed up.
"unsigned long long" is not very descriptive. Even saying "C's unsigned long long" is not very descriptive. That simply means they are at least 64-bit and says nothing of byte order.
It seems you want to unpack unsigned 64-bit integers in native or network byte order.
my @vals = unpack('Q*', pack('H*', "000....")); # Native byte order my @vals = unpack('Q>*', pack('H*', "000....")); # Network byte order
">" requires Perl 5.10
"Q" requires a build of Perl that can actually hold 64-bit integers.
In reply to Re: reading packed unsigned long long
by ikegami
in thread reading packed unsigned long long
by Spooky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |