On Fri, Feb 15, 2008 at 01:04:24PM -0800, [EMAIL PROTECTED] wrote: > I've been trying to use regular expressions or some kind of counter > thing, but I can't seem to work this right. I have data in a text file > where the important thing I want to extract is between two blank > lines. That's the only systematic way to find the useful lines. > > So, it'll go "blank line, important stuff, blank line". There are > plenty of other lines of text that may be have a blank line before or > after it. But only the important ones have both. > > Is there a simple way to extract/print these lines? Thanks!
$ perl -l12n00e 'print unless /\n/' perldoc perlrun to see what those switches are doing. $ perl -MO=Deparse -l12n00e 'print unless /\n/' might help too. Note that there is an implied blank line at the start and end of the file with this solution which may not be what you want. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/