Finally a tip. I found this in the book Perl Hacks with these two vim
mappings:
map ,pt <ESC>:%! perltidy<CR>
map ,ptv <ESC>: '<,'>! perltidy<CR>
You can also filter pass without mappings. Just select the text you want (V to enter visual mode, arrow up/down to select), then !perltidy to reformat the selection. Very useful however you do it!
--Joe