Front page | perl.perl5.porters |
Postings from May 2012
[perl #113420] "\" does not escape meta chars if also delim
Thread Next
From:
Eric Brine
Date:
May 28, 2012 23:40
Subject:
[perl #113420] "\" does not escape meta chars if also delim
Message ID:
rt-3.6.HEAD-5009-1338273559-763.113420-75-0@perl.org
# New Ticket Created by "Eric Brine"
# Please include the string: [perl #113420]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113420 >
This is a bug report for perl from ikegami@adaelis.com,
generated with the help of perlbug 1.39 running under perl 5.14.2.
-----------------------------------------------------------------
[Please describe your issue here]
About "\", perlre says:
"Quote the next metacharacter."
"So anything that looks like \\, \(, \), \<, \>, \{, or \} is always
interpreted as a literal character, not a metacharacter."
"Any single character matches itself, unless it is a metacharacter with a
special meaning described here or above. You can cause characters that
normally function as metacharacters to be interpreted literally by
prefixing them with a "\" (e.g., "\." matches a ".", not any character;
"\\" matches a "\"). This escape mechanism is also required for the
character used as the pattern delimiter."
Yet when "\" is used to escape a char that's both delimiter and meta, the
escaped character doesn't cease being meta as documented.
>perl -E" say 'a' =~ m/\./ ? 'XXX' : 'ok' "
ok
>perl -E" say 'a' =~ m.\.. ? 'XXX' : 'ok' "
XXX
- Eric
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.14.2:
Configured by gecko at Fri Oct 7 15:46:51 2011.
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32BIT_TIME_T',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='16.0.40219', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\progs\perl5142-ap1402\lib\CORE" -machine:x86'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib msvcrt.lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl514.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -libpath:"C:\progs\perl5142-ap1402\lib\CORE" -machine:x86'
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
---
@INC for perl 5.14.2:
C:/Progs/perl5142-ap1402/site/lib
C:/Progs/perl5142-ap1402/lib
.
---
Environment for perl 5.14.2:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\;c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN;c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v3.5;c:\Program
Files (x86)\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files
(x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files
(x86)\Microsoft
SDKs\Windows\v7.0A\bin;C:\progs\perl5142-ap1402\site\bin;C:\progs\perl5142-ap1402\bin;C:\Program
Files (x86)\NVIDIA
Corporation\PhysX\Common;c:\bin;C:\Progs\perl5140-ap1400\site\bin;C:\Progs\perl5140-ap1400\bin;C:\Program
Files
(x86)\UltraEdit;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files
(x86)\Common Files\Microsoft Shared\Windows Live;C:\Program
Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth
Software\syswow64;C:\Program Files (x86)\Common Files\Ulead
Systems\MPEG;C:\Program Files\Microsoft Windows Performance
Toolkit\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files
(x86)\QuickTime\QTSystem\
PERL_BADLANG (unset)
SHELL (unset)
Thread Next
-
[perl #113420] "\" does not escape meta chars if also delim
by Eric Brine