in reply to Re: Split on every second character
in thread Split on every second character
I agree that some variation of an approach using m/..?/g or unpack() is better, but a more concise split() solution would be:
>perl -wMstrict -le "print for grep length, split /(..)/, '0001020304101112';" 00 01 02 03 04 10 11 12
|
|---|