Subject: | \0 |
Date: | Thu, 3 Dec 2015 00:07:13 +0100 |
To: | bug-rename [...] rt.cpan.org |
From: | Glen Mével <glen.mevel [...] crans.org> |
hello,
i had an unexpected (and quite annoying, as i lost a big dataset)
behaviour with (perl-)rename 1.9 (both the one packaged for Archlinux
and the one found at <http://search.cpan.org/~pederst/rename/>, which
are identical saved from two lines), when using a \0 back-reference.
$ uname -a
Linux hal 4.2.3-1-ARCH #1 SMP PREEMPT
Sat Oct 3 19:08:23 CEST 2015 i686 GNU/Linux
$ perl -v
This is perl 5, version 22, subversion 0 (v5.22.0)
built for i686-linux-thread-multi
$ pacman -Ss perl-rename
community/perl-rename 1.9-1 [installé]
$ echo this is aa > aa
$ echo this is bb > bb
$ ls |sed 's/^./x\0/'
# this is what is commonly expected
xaa
xbb
$ perl-rename -v 's/^./x\0/' *
# this is what perl-rename claims to do
# (wrong w·r·t· what precedes) …
aa -> xa
bb -> xb
$ ls
# … and this is what it really does (wrong anyway!)
x
$ cat x
this is bb
--
regards,
Glen Mével