Why do I have to specify the -i switch with a backup extension when using ActivePerl?
- by Zaid
I cannot get in-place editing Perl one-liners running under ActivePerl to work unless I specify them with a backup extension:
C:\> perl -i -ape "splice (@F, 2, 0, q(inserted text)); $_ = qq(@F\n);" file1.txt
Can't do inplace edit without backup.
The same command with -i.bak or -i.orig works a treat, but also creates an unwanted backup file in the process.
Has anyone else faced similar issues? Is there a way around this?