Don't ask to ask, just ask | |
PerlMonks |
Re: using bits to print part of a stringby choroba (Cardinal) |
on Mar 15, 2013 at 16:03 UTC ( [id://1023730]=note: print w/replies, xml ) | Need Help?? |
I created the bit mask from the mask by replacing 0's by \x00 and 1's by \xff. Then, you can use bitwise & and can easily remove the resulting \x00's:
Updated: Using tr/ instead of s/ at line 10 speeds the method up.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|