Problems? Is your data what you think it is? | |
PerlMonks |
Re: Convert ASCII string to 7-bit binary stringby AppleFritter (Vicar) |
on Oct 27, 2015 at 22:17 UTC ( [id://1146183]=note: print w/replies, xml ) | Need Help?? |
Here's another regex-based solution:
Fairly straightforward, actually - this globally (/g) matches every character ((.)), executes (/e) the embedded snippet of code, and replaces the matched character with the result of the call to unpack. EDIT: please see below for a version that actually works properly.
In Section
Seekers of Perl Wisdom
|
|