This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Perl with -i option removes files


Hi!

Following szenario:

$ echo abc > testfile

$ perl -p -i -e 's/b/x/g' testfile
Can't do inplace edit on testfile: Permission denied.

$ ls -l testfile
ls: testfile: No such file or directory

If I use:
$ perl -p -i".bak" -e 's/l/x/g' testfile

I get an unchanged testfile.bak plus a changed testfile.

Is this a bug or feature?

$ cygcheck -c cygwin perl
Cygwin Package Information
Package             Version
cygwin              1.3.17-1
perl                5.6.1-2

on Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3.

I also tested this sequence on:

[q@unics]~:{349}:$ uname -a
SunOS unics 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-Enterprise
[q@unics]~:{351}:$ perl -v
This is perl, version 5.005_03 built for sun4-solaris

where it doesn't remove the file.

Bye
   Volker

--
PGP/GPG key  (ID: 0x9F8A785D)  available  from  wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913  9E53 3D35 C9BA 9F8A 785D

Attachment: msg01272/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]