in reply to multi-line RE question

perl -p reads line by line, there can only be one \n at most inside a line, at the end of the line. Your regex requires two \n characters to match. Changing the first \n to ^ is necessary for it to match.

But it seems what you really want is something like grep -v ^Blah or grep ^Line. See grep.

Replies are listed 'Best First'.
Re^2: multi-line RE question
by Anonymous Monk on Aug 02, 2011 at 11:47 UTC
    But it should also remove the empty last line.