Perltidy is really handy for cleaning up badly-formatted Perl code.
--cuddled-else --paren-tightness=2 --vertical-tightness=1 --vertical-tightness-closing=2 --maximum-line-length=120 --no-outdent-long-quotes --no-outdent-long-comments