in reply to Backup filename extension with -i option

The remark done by ikegami becomes obvious if you peek the code behind the one-liner with B::Deparse:

$ perl -MO=Deparse -i.$$ -pe 's/search/replace/g' *.html BEGIN { $^I = ".2412"; } LINE: while (defined($_ = <ARGV>)) { s/search/replace/g; } continue { print $_; } -e syntax OK

In this case, the "2412" came from the shell as ikegami pointed. I tried to hide $$ from the shell by quoting, but to no avail. Indeed, $$ must be in the Perl code — the argument of -i is interpreted as literal string in attempts like:

$ perl -MO=Deparse -i'.$$' -pe 's/search/replace/g' *.html BEGIN { $^I = ".\$\$"; } ...