This isn't particularly a Perl question, is it?<br><br>That said, if you're interested in doing this with Perl, you should look into Damian Conway'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. But these are pretty easy to do with Perl (plus some standard Unix shell tools like "find" and "xargs") 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> <<a href="mailto:rpjday@mindspring.com">rpjday@mindspring.com</a>> 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> is there a convenient way to, throughout an entire source tree,<br>delete all content in all source or header files that's been<br>de-activated with an "#if 0"? that would, of course, include the "#if
<br>0" line and all content up to and including the terminating "#endif"<br>(which might have some extraneous comment content after it).<br><br> 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>