Bug#754057: perl: erroneous quoting in Makefile.SH
Niko Tyni
ntyni at debian.org
Sat Apr 18 18:43:35 UTC 2015
Control: forwarded -1 https://rt.perl.org/Ticket/Display.html?id=124343
On Wed, Apr 15, 2015 at 10:49:31PM +0300, Niko Tyni wrote:
> On Mon, Jul 07, 2014 at 09:30:20AM +0300, Niko Tyni wrote:
>
> > echo "$1" | sed 's/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g' ;;
> (My, what a mess.)
> while the suggested 's/\([^a-zA-Z0-9.:_\/-]\)/\\\1/g'
> would quote characters that are
>
> - not alphanumeric
> - not one of '.', ':', '_', '\', '/', or '-'
>
> which is probably what was intended here.
Heh, the backslash probably *should* be quoted.
So my suggestion is
echo "$1" | sed 's/\([^a-zA-Z0-9.:_/-]\)/\\\1/g'
which I've just forwarded upstream as [perl #124343]
--
Niko
More information about the Perl-maintainers
mailing list