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.
In reply to Re^4: Interleaving bytes in a string quickly
by BrowserUk
in thread Interleaving bytes in a string quickly
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |