There’s the experimental unpack
use experimental :pack; my $bytearray = "01234567".encode('utf-8'); say $bytearray.unpack("A1 L H");
It’s not exactly the same, though; this outputs “(0 875770417 35)”. You can tweak your way through it a bit, maybe.
There’s also an implementation of Perl’s
unpack in P5pack
CLICK HERE to find out more related problems solutions.