perl and problem with in-place edits (just deletes files) on Cygwin 1.3.10 on Win98

Max maxng@webwizarddesign.com
Thu Jun 27 23:27:00 GMT 2002


Hi,

Ran this command the other day in a directory with C files

perl -p -i -e 's/string1/string2/g' *c

Got a long list of

Can't do inplace edit on name.c: File exists.

At the end of it, all the .c files were deleted .. I assume this is a
symlink issue .. that perl is calling
some system file linking function that isn't implemented properly or
implemented at all?

Output from perl -v:

This is perl, v5.6.1 built for cygwin-multi

I know that with the Win32 port it will not allow you to do an inplace edit
without specifying a backup
extension after -i, e.g.

perl -p -i.bak -e 's/string1/string2/g' glob

I assumed that since the Cygwin perl didn't give this warning it would do
the right thing ;) ... I am very thankful for
shareware undelete software now!

Anybody know what isn't in place for this to work correctly?

Max




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list