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 creates an unwanted backup file in the process.
Is there a way around this?