I have an specific problem to solve in Perl 5 (using minimal external dependencies, if possible compatible with version 5.12), related to decode an array of bytes like this:
my @data = (0x00, 0x00, 0x00, 0x03, 0x84, 0x14, 0x40, 0x32);
and I want to extract a number like this: 15100821554
I try several variations of pack / unpack without success like
say(unpack("Q", pack("C*", @data)));
print 3620916657624449024
The equivalent code in go is something like this
data := []byte{0x00, 0x00, 0x00, 0x03, 0x84, 0x14, 0x40, 0x32}
deciseconds := int64(binary.BigEndian.Uint64(data))
can be executed here: https://play.golang.org/p/I2J45H-sn-H
any ideas?