in reply to Convert ASCII string to 7-bit binary string
$out = unpack('B*', '4B') =~ s/.(.{7})/$1/gr; [download]