develooper Front page | perl.perl5.porters | Postings from March 2007

[perl #41916] match a single byte \C doesn't work in character class

Thread Next
Christopher Lane
March 19, 2007 16:41
[perl #41916] match a single byte \C doesn't work in character class
Message ID:
# New Ticket Created by  Christopher Lane 
# Please include the string:  [perl #41916]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.35 running under perl v5.8.6.

The following prints "yes" (ie. works)

perl -we 'print(("a" =~ m/\C/) ? "yes" : "no", "\n")'

But this (added [] around \C) prints a warning and doesn't work  
(prints "no")

perl -we 'print(("a" =~ m/[\C]/) ? "yes" : "no", "\n")'
Unrecognized escape \C in character class passed through in regex;
marked by <-- HERE in m/[\C <-- HERE ]/ at -e line 1.

I tested this with and without 'use charnames'
This also appears to be the case with \X
This also appears to be the case under Perl 5.8.8

I've no personal need for this to be fixed, I'm simply trying to  
characterize in a technical note which character class abbreviations  
work inside m/[]/ and which do not.  These two seem inconsistent with  
the rest.  So, a simple confirmation that this is a bug or a  
misunderstanding on my part is sufficient.  Thank you!
Site configuration information for perl v5.8.6:

Configured by root at Thu Nov  2 10:35:22 PST 2006.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
     osname=darwin, osvers=8.0, archname=darwin-thread-multi-2level
     uname='darwin 8.0 darwin kernel version 8.3.0: mon  
oct 3 20:04:04 pdt 2005; root:xnu-792.6.22.obj~2release_ppc power  
macintosh powerpc '
     config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  - 
Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=define use5005threads=undef useithreads=define  
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
     cc='cc', ccflags ='-g -pipe -fno-common -DPERL_DARWIN -no-cpp- 
precomp -fno-strict-aliasing -I/usr/local/include',
     cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no- 
cpp-precomp -fno-strict-aliasing -I/usr/local/include'
     ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc.  
build 1819)', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8,  
Off_t='off_t', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/ 
     libpth=/usr/local/lib /usr/lib
     libs=-ldbm -ldl -lm -lc
     perllibs=-ldl -lm -lc
     libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true,  
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup -L/ 

Locally applied patches:
     23953 - fix for File::Path::rmtree CAN-2004-0452 security issue
     33990 - fix for setuid perl security issues
     SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962

@INC for perl v5.8.6:

Environment for perl v5.8.6:
     DYLD_LIBRARY_PATH (unset)
     HOME=/Volumes/Users HD/cdl
     LANG (unset)
     LANGUAGE (unset)
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
     PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About