in reply to Re: strip out lines until match
in thread strip out lines until match

I am guessing you meant
@lines = grep { $_ !~ /^\s*\n?\r?$/ } @lines
instead of
@lines = grep { $_ != /^\s*\n?\r?$/ } @lines
(i.e., s/!=/!~/).

Also as a nitpick, \s is an abbreviation to the character class [\ \t\r\n\f] (reference: perlreftut)so the \n and the \r are never matched as the * is greedy (i.e. they are unnecessary).

-enlil