For those who edit with emacs, here are a couple of functions that I find useful. The first one runs perl on the current region, replacing it with the results of the command. The second does the same for the current buffer.
Both functions attempt to preserve the current locations of point and mark as best they can. In the case of updating the entire buffer, the point and mark maintain the same line & column number, if possible.
I'm not an elisp guru; suggestions and improvements welcome!