in reply to Fastest split possible

Hello pedrete,

to see it you can use Benchmark to test different approach, like capturing using regexes with g modifier.

But probably, if you are experienceing slowness with split which is fast, you simply have to avoid to accumulate results into @array

Infact if $HugeString is huge, would be probably better to process each element directly like in:

process($_) for split /\n/,$HugeString;

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.