Why did we get a different result
Perhaps you are running a different Perl version? From perl5280delta:
Previously in-place editing (perl -i) would delete or rename the input file as soon as you started working on a new file. ... This has changed so that the input file isn't replaced until the output file has been completely written and successfully closed. This works by creating a work file in the same directory, which is renamed over the input file once the output file is complete.
In reply to Re^3: How does rename() work on read-only files?
by haukex
in thread How does rename() work on read-only files?
by j41r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |