in reply to Perl pie with $1 replacements ?
Updated.
http://perldoc.perl.org/perlrun.html:
The extension, if supplied (emphasis added), is used to....
And though this is already discussed (below), the examples (in the 5.12 doc) of using -p, -i and -e together are constructed this way:
perl -pi -e ...