http://qs321.pair.com?node_id=11102899


in reply to Can split split against more than one character in a string of the same character?

Another approach would be to use unpack.

johngg@shiraz:~/perl/Monks$ perl -Mstrict -Mwarnings -E ' my $str = q{aaaaaaaaa}; my @parts = unpack q{(a2)*}, $str; say qq{@parts};' aa aa aa aa a

I hope this is helpful.

Cheers,

JohnGG