On Wed, Nov 14, 2001 at 09:03:21PM -0500, Jeff 'japhy' Pinyan wrote:
> On Nov 14, Michael G Schwern said:
> 
> >    1) Strips all comment-only lines from a Perl program (ie. /^\s*#/)
> >       except those which are C pre-processor commands.  (It's not
> >       necessary to worry about if you're inside a string or not).
> 
> perl -pe 's/^\s*#\s*(?!include|define|if(n?def)?|el(se|if)|undef|endif).*//s'
> 
> #2 is not likely to be solved in 80 characters.

How few can you get it down to?


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One

Reply via email to