The comments you've already gotten are certainly correct, but for giggles you might look inside Perl::Tidy, which does (internally) something that looks not unlike what you describe. If you're lucky, you can even get perltidy (same code, executable front-end) to do your whole source-filtering job for you, and save yourself writing anything more complex than a config file.
In reply to Re: Module to parse perl
by ChemBoy
in thread Module to parse perl
by fletcher_the_dog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |