This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: Perl with -i option removes files
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: "Volker Quetschke" <quetschke at scytek dot de>,<cygwin at cygwin dot com>
- Date: Wed, 22 Jan 2003 21:05:51 +0100
- Subject: RE: Perl with -i option removes files
> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Volker Quetschke
> Sent: Wednesday, January 22, 2003 10:35 AM
> To: cygwin@cygwin.com
> Subject: 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
>
--
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/