in reply to Regex (?(...)...)

You appear to be using the (experimental) construct (?(...)...) incorrectly. In fact, I don't know why you're using it at all.

$shortFile =~ /^(\d+ )+\s+(\d+)+$(?{$covCounter++})/gm;

And you're also using the experimental construct (?{...}) for no good reason.

$shortFile =~ /^(\d+ )+\s+(\d+)+$(?{$covCounter++})/gm;
can be written as:
$covCounter++ while $shortFile =~ /^(\d+ )+\s+(\d+)+$/gm;

btw, please use <code> tags around your code.

Replies are listed 'Best First'.
Re^2: Regex (?(...)...)
by Anonymous Monk on Mar 29, 2005 at 22:13 UTC
    Thank you very much and sorry for the ugly post. Your right. Keep things simple.