in reply to Pack/Unpack with B32 and related query

Replace

(1 x $str2), (1 x (32 - $str2))

with

(1 x $str2) . (0 x (32 - $str2))

B32 want a string of 32 characters (preferably where each character is "0" or "1"). When you give it a string of fewer than 32 chars, then it assumes "0"s for the missing chars. Your second string is simply being ignored.

- tye