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

length works

reverse works

Funny definition of "works":

$a=''; $a .= chr 1<<$_ for 0 .. 63;; print length $a;; 64 $a = reverse $a;; Malformed UTF-8 character (byte 0xfe) in reverse print length $a;; 75

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"

Replies are listed 'Best First'.
Re^43: Interleaving bytes in a string quickly
by ikegami (Patriarch) on Mar 03, 2010 at 00:15 UTC
    I don't get that.
    $ perl -le' > $a=""; $a .= chr 1<<$_ for 0 .. 63; > print length $a; > $a = reverse $a; > print length $a; > ' 64 64
    Maybe it's cause I'm on a 32-bit build? $a contains 0..31,0..31 and the reverse once reversed.