From: Johannes Sixt Date: Tue, 09 May 2017 20:43:03 GMT Subject: Re: [PATCH] fixup! use perl instead of sed Message-ID: <4cb1d101-3efa-6376-64fd-2b9090d0b0c4@kdbg.org> In-Reply-To: Am 09.05.2017 um 19:00 schrieb Ævar Arnfjörð Bjarmason: > Finally, you can just use -i like you did with sed, no need for the tempfile: Nope. Some implementations of perl attempt to remove the file that it has just opened. That doesn't work on Windows. You have to supply a backup file name as in `perl -i.bak ...` :-( > > $ echo hibar >push > $ perl -pi -e 's/([^ ])bar/$1baz/' push > $ cat push > hibaz -- Hannes