in reply to Help with regex

I suspect you are forgetting to chomp your input.

Have you used the debugger on this script, and really looked at what each each $line looks like?

throop

Replies are listed 'Best First'.
Re^2: Help with regex
by FunkyMonk (Bishop) on Sep 28, 2007 at 20:16 UTC
    Given that the OP is searching for strings that end with a newline, I doubt chomping is going to help!