The Perltidy Home Page

SourceForge Logo

Welcome to Perltidy

Perltidy is a Perl script which indents and reformats Perl scripts to make them easier to read. If you write Perl scripts, or spend much time reading them, you will probably find it useful.

Here are a few examples of reformatted code snippets:

The formatting can be controlled with command line parameters. The default parameter settings approximately follow the suggestions in the Perl Style Guide.

Perltidy can also output html of both pod and source code. For example, the link below is an html version of the module from SpamAssassin.

Besides reformatting scripts, Perltidy can be a great help in tracking down errors with missing or extra braces, parentheses, and square brackets because it is very good at localizing errors.



Perltidy should run on any system with perl 5.008 or later.
  • Please check the README File
  • Please check the Installation Notes
  • Download The latest release (.tgz, Unix-style line endings)
  • Download The latest release (.zip, Windows-style line endings)
  • Debian users can use: apt-get install perltidy
  • Download rpm's from Rpmfind.Net
  • If these links are broken, go to the download area at the SourceForge Project Page
  • Or look for it at CPAN