in reply to Splitting a long string
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Splitting a long string
by almut (Canon) on Aug 22, 2007 at 09:59 UTC | |
|
Re^2: Splitting a long string
by uvnew (Acolyte) on Aug 22, 2007 at 11:15 UTC |