gabriel rosenkoetter on 2 Dec 2003 16:17:02 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] search and replace multiple files?


On Tue, Dec 02, 2003 at 01:09:27PM -0800, John Fiore wrote:
>       perl -pie 's/foo/bar/' file1
> 
> I get the error:
>      Can't open perl script "s/foo/bar/": No such file
> or directory

Try perl -pi -e 's/foo/bar/' <files>

Parsing of -e as part of a block of switches appears to be broken,
at least with my copy of 5.6.1.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgp0VwhkJdlPC.pgp
Description: PGP signature