Thanks so much.
But when does .perltidyrc get executed?
- automatically when we start a perl script? or
- when we pass the command: $ perltidy myfile.pl ?
| [reply] [d/l] [select] |
Nothing's *automatic* per se. Perltidy is a filter that you run on source. As TheDamian has it setup, it will print to STDOUT, so you can do something like this:
perltidy sloppy_format.pl > cleaned_up.pl
.perltidyrc will be automatically called for configuration details. Once you get that figured out, you can even hightlight one block in vim and do "! perltidy" to cleanup just a block within a file.
Good luck and perservere. Tidy code is a worthwhile endeavor, whether you create it that way or beat it into submission with a tool.
| [reply] [d/l] |