ActiveState docs suggest you can:
perl -pi '.orig' -e 's/bar/baz/' fileA    to specify the .orig suffix but
That did not work for me.
perl -pi.bak -e 's/bar/baz/' fileA  does! Thanks John
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dave K wrote:
> >
> >     perl -pi -e 's/foo/bar/' my_file.txt
> > is supposed to do an inplace edit of my_file.txt, looping over each
line,
> > replacing foo with bar. Instead it merely stomps my_file.txt,
effectively
> > erasing it. Any body know why?
> > Perl for cygwin, WinNt is the environment.
>
> Yes, this is a known problem with the -i switch on Windows.  You have to
> include a file extention or it won't work.
>
>     perl -pi.bak -e 's/foo/bar/' my_file.txt
>
>
> John
> --
> use Perl;
> program
> fulfillment



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to