That should be q> (big-endian byte order), not q (native byte order).
Furthermore, it would be better to pad out the hex number in case fewer than 16 digits are provided.
sub hex_to_signed_quad { return unpack 'q>', substr(('0'x16).$_[0], -16); }
In reply to Re^2: -1 from hex ffffffffffffffff ?
by ikegami
in thread -1 from hex ffffffffffffffff ?
by Spooky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |