in reply to Performance challenges

Untested:

open(INPUT, 'original.txt'); open(GOOD, ">good.txt"); open(BAD, ">bad.txt"); while(<INPUT>){ if(/^([^\t]*\t){15}[^\t]{5}(\t)[^\t]{7}(\t)/){ print GOOD; } else{ print BAD; } } close GOOD; close BAD;
Tom Melly, tom@tomandlu.co.uk

Replies are listed 'Best First'.
Re^2: Performance challenges
by salva (Canon) on Mar 22, 2006 at 12:17 UTC
    it will be much faster if non-capturing groups are used in the regexp:
    /^(?:[^\t]*\t){15}[^\t]{5}\t[^\t]{7}\t/