in reply to Unable to unpack a hex string

Your use of parentheses around some of the Bs in the OPed code and not others suggests that you might want to skip over the BBBBB group. If so:

c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $counter = '87654321'; my @x = unpack 'a3 a3 a2 a a a a2 a3 x[a5] a11', unpack 'B*', pack 'H*', $counter ; dd \@x; " [100, "001", 11, 0, 1, 1, "00", 101, "01100100001"]


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^2: Unable to unpack a hex string
by kjoy10970 (Initiate) on May 17, 2017 at 17:31 UTC

    Thank a lot , I understood the mistake and could correct it