This isn&#39;t particularly a Perl question, is it?<br><br>That said, if you&#39;re interested in doing this with Perl, you should look into Damian Conway&#39;s module called Text::Balanced.<br><br><a href="http://search.cpan.org/~dconway/Text-Balanced-v2.0.0/lib/Text/Balanced.pm">
http://search.cpan.org/~dconway/Text-Balanced-v2.0.0/lib/Text/Balanced.pm</a><br><br>This only identifies the nested #if 0 ... #endif blocks. Traversing the source tree, keeping what you what in the files, editing and saving the files in place, etc., is all up to you.&nbsp; But these are pretty easy to do with Perl (plus some standard Unix shell tools like &quot;find&quot; and &quot;xargs&quot;) too. :-)
<br><br>Cheers,<br>Richard<br><br><div><span class="gmail_quote">On 3/17/07, <b class="gmail_sendername">Robert P. J. Day</b> &lt;<a href="mailto:rpjday@mindspring.com">rpjday@mindspring.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&nbsp;&nbsp;is there a convenient way to, throughout an entire source tree,<br>delete all content in all source or header files that&#39;s been<br>de-activated with an &quot;#if 0&quot;?&nbsp;&nbsp;that would, of course, include the &quot;#if
<br>0&quot; line and all content up to and including the terminating &quot;#endif&quot;<br>(which might have some extraneous comment content after it).<br><br>&nbsp;&nbsp;thoughts?<br><br>rday<br>_______________________________________________
<br>kw-pm mailing list<br><a href="mailto:kw-pm@pm.org">kw-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/kw-pm">http://mail.pm.org/mailman/listinfo/kw-pm</a><br></blockquote></div><br>