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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can split split against more than one character in a string of the same character?
by Don Coyote (Hermit) on Jul 15, 2019 at 22:35 UTC |
In Section
Seekers of Perl Wisdom