Anyway, here's a simple solution with regexps. It allows a trailing element that's too short. (If you don't want that, drop the "1," from the quantification.)
my $str = "PERLPERLPEBLPEBLPERL"; my @parts = $str =~ /.{1,4}/g;
In reply to Re: how to splice an array?
by gaal
in thread how to splice an array?
by heidi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |