For a modest size string like that:
for my $temp ($str =~ /.{1,1000}/g) { # do stuff with $temp }
is probably sufficiently fast.
Update: s/1000/1,1000/ per almut's catch.
In reply to Re: Splitting a long string
by GrandFather
in thread Splitting a long string
by uvnew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |