I don't really want to subscribe the this list, but I have this little ditty in my .emacs file, and i use it at least once a day...
;; http://perlmonks.org/index.pl?node_id=188959
; run perl on the current region, updating the region
(defun perl-replace-region (start end)
"Apply perl command to region"
(interactive "r")
(shell-command-on-region start end
(read-from-minibuffer "Replace region comma
+nd: " '("perl -ple \'$_=eval\'" . 12 ))
t
t
)
(exchange-point-and-mark)
)
I got it from this snippet but added the eval so that i can immediately evaluate simple expressions (usually math equations). Since it's interactive (and since the cursor is placed in just the right spot) it's easy to replace the eval with something else when I need to.
(Anyone who wants to mail this in should feel free)