in reply to indent for Perl?

I use emacs with cperl-mode and perltidy. I've added the following to my .emacs file:
(defun perltidy () "Run perltidy on the current region or buffer." (interactive) (save-excursion (unless mark-active (mark-defun)) (shell-command-on-region (point) (mark) "perltidy --profile=/home/ +foo/.perltidyrc -q" nil t))) (global-set-key [(f5)] 'perltidy)
Then I simply mark a region and press F5 to indent it nicely (according to my settings in the /home/foo/.perltidyrc file.
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]