in reply to Re: Large file data extraction
in thread Large file data extraction

So long as there's a single match you're going to be stuck in an infinite loop

Actually no. There is a g modifier on the regex. The while loop only iterates as long as there is another match. Consider:

print "$1\n" while '1234X5678X' =~ m/([^X]+)X/g;

Prints:

1234 5678

Perl reduces RSI - it saves typing