alienhuman has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I've got a string that looks like this:
blah @QUERY meaningful data meaningful data ... etc... @ENDQUERY @QUERY2 more data more data ... etc ... @ENDQUERY2
What I'd like to do is strip out all those blank lines before @QUERY (note I don't care about the blanks elsewhere).
As an added wrinkle, these lines can either have \r\n or \n at the end of 'em.
Your help appreciated,
AH
Using perl 5.6.1 unless otherwise noted. Apache 1.3.27 unless otherwise noted. Redhat 7.1 unless otherwise noted.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strip out lines until match
by bart (Canon) on Apr 15, 2004 at 22:30 UTC | |
|
Re: strip out lines until match
by muba (Priest) on Apr 15, 2004 at 22:10 UTC | |
by Enlil (Parson) on Apr 15, 2004 at 23:51 UTC | |
|
Re: strip out lines until match
by BrowserUk (Patriarch) on Apr 15, 2004 at 23:15 UTC | |
by alienhuman (Pilgrim) on Apr 16, 2004 at 13:30 UTC | |
by BrowserUk (Patriarch) on Apr 16, 2004 at 14:15 UTC | |
by alienhuman (Pilgrim) on Apr 16, 2004 at 15:17 UTC | |
|
Re: strip out lines until match
by ccn (Vicar) on Apr 15, 2004 at 22:40 UTC |