Tuesday, August 28, 2007

Perl-Tidy

Perltidy is a tool to indent and reformat perl scripts. It can also write scripts in html format.

Try it in your command prompt as:

perltidy perlprgname.pl

For safety, perltidy never overwrites your original file. In this case, its output will go to a file named perlprgname.pl.tdy

Not only does it nicely format code, it does an excellent job of telling you where your syntax errors are.

Error report will be in

perlprgname.pl.ERR

If you want the Perl as html just type in:

perltidy -html perlprgname.pl

No comments: