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