in reply to Re: regex error puzzle
in thread regex error puzzle

perl reports any error on line 10, the first line of the if block

No, line 10 isn't the first line of the 'if' block. Perl does report misleading line numbers for some errors in 'if' blocks, but this is restricted to saying that errors in an 'elsif' conditional expression occurred on the line of the matching 'if'.

- tye