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]