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
In reply to Re^2: Split on every second character
by AnomalousMonk
in thread Split on every second character
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |