Keep It Simple, Stupid | |
PerlMonks |
Re: Compact and sparse bit vectorby demerphq (Chancellor) |
on Jan 03, 2009 at 13:35 UTC ( [id://733910]=note: print w/replies, xml ) | Need Help?? |
The only thing is a lot of the time people use vec() specifically because they want the string to be a bit-vector. They dont want to use it as an array of <8 bit units of information so much, as a way to individually control bits in a string with a reasonably syntax. Although having said that, the problem with vec() in this form is that it doesnt use native byte order, so you cant normally pass it directly into a C routine. So i guess your proposal has some merit...
--- $world=~s/war/peace/g
In Section
Cool Uses for Perl
|
|