in reply to Re^2: Help me decipher code containing map function
in thread Help me decipher code containing map function

Because  H* gives you a single string of an unlimited number, necessarily even, of hex characters, but  (H2)* gives you an unlimited number of groups of pairs (or in the case of  (H4)* quartets). The parentheses do grouping in pack/unpack templates. The groups can be quantified. BTW: This is susceptible to experimentation:

c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $octetstr = qq{\xab\xcd\x00\x1d\x94\x56}; ;; my @ra = unpack 'H*', $octetstr; dd \@ra; ;; @ra = unpack '(H2)*', $octetstr; dd \@ra; ;; @ra = unpack '(H4)*', $octetstr; dd \@ra; " ["abcd001d9456"] ["ab", "cd", "00", "1d", 94, 56] ["abcd", "001d", 9456]


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