indent
will do for
C. The complex feedback between the scanner and the parser (this feedback is what confuses the vgrind and emacs programs) make it challenging at best to write a stand-alone Perl parser.
Of course, if you simply follow the guidelines in the perlstyle manpage, you shouldn't need to reformat.
Your editor can and should help you with this. The perl-mode for emacs can provide a remarkable amount of help with most (but not all) codes, and even less programmable editors can provide significant assistance.
If you are using to using vgrind program for printing out nice code to a laser print, you can take a stab at this using CPAN/doc/misc/tips/working.vgrind.entry, but the results are not particularly satisfying for more sophisticated code.