On Thu, Nov 15, 2001 at 03:26:30PM +0000, Ian Phillipps wrote:
> On Thu, 15 Nov 2001 at 10:20:58 -0500, Ronald J Kimball wrote:
> 
> > That will not work in this case, because it would print out a newline for
> > every line of input, including the ones that are being skipped.
> 
> I'd construe that as a feature: the line numbers stand more chance of
> remaining in sync - useful for debugging.

Good idea, can you adapt these?

perl -ne '/^\s*#(?!\s*((ifn?|un)def|(el|end)?if|define|include|else)\s)/||print'

perl -ne 
'(1../^#!.*perl/i)|/^\s*#(?!\s*((ifn?|un)def|(el|end)?if|define|include|else)\s)/||print'


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
List context isn't dangerous.  Misquoting Gibson is dangerous.
        -- Ziggy

Reply via email to