in reply to Re^3: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly

But your unpack routine doesn't seem to work correctly.

It does:

$s = 'a' x 10; print join( 'B', unpack '(A1)*', $s ) . 'B';; aBaBaBaBaBaBaBaBaBaB

But not with nulls. The template would have to be '(a1)*' in that case.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"