Perltidy reads a perl script and writes an indented, reformatted script. WWW: http://search.cpan.org/dist/Perl-Tidy