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
In reply to Re: Can split split against more than one character in a string of the same character?
by johngg
in thread Can split split against more than one character in a string of the same character?
by Don Coyote
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |