develooper Front page | perl.perl5.porters | Postings from November 2004

[perl #32689] Some regex delimiters considered more equal than others

Thread Next
From:
Markus . Jansen @ ericsson . com
Date:
November 29, 2004 14:56
Subject:
[perl #32689] Some regex delimiters considered more equal than others
Message ID:
rt-3.0.11-32689-101229.14.7782176250545@perl.org
# New Ticket Created by  Markus.Jansen@ericsson.com 
# Please include the string:  [perl #32689]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32689 >



This is a bug report for perl from Markus.Jansen@ericsson.com,
generated with the help of perlbug 1.35 running under perl v5.8.4.


-----------------------------------------------------------------
[Please enter your report here]

Hello Perl5 porters,

as a regex delimiter, single quotes seem to be "special", as
variables inside the target are not being expanded -
is this a feature or a bug?

Finest regards,

    Markus

Example (output should be "brumm\nbrumm\n" if delimiters were equal):

/app/perl/5.8.4/bin/perl -e '{$a = "bla"; $b = "blubb"; $c = $d = "${a} ${b}"; $c =~ s"$a $b"brumm"; $d =~ s'"'"'$a $b'"'"'brumm'"'"'; print "$c\n"; print "$d\n";}'
brumm
bla blubb


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.8.4:

Configured by root at Wed Nov 10 12:26:09 MET 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sparc-solaris-64int
    uname='sunos sesaux031 5.8 generic_108528-29 sun4u sparc sunw,ultra-5_10 solaris '
    config_args='-des -Dldflags=  -L/app/gcc/3.0.4/lib -L/app/gdbm/1.8.0/lib -L/app/db/3.3.11/lib -L/usr/openwin/lib -R/app/perl/5.8.4/lib -R/app/gcc/3.0.4/lib -R/app/gdbm/1.8.0/lib -R/app/db/3.3.11/lib -R/usr/openwin/lib -L/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE -R/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE -lgdbm -Uinstallusrbinperl -Dprefix=/app/perl/5.8.4 -Darchname=sparc-solaris -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Dman3dir=/app/perl/5.8.4/man/man3 -Duse64bitint -Darchlib=/app/perl/5.8.4/lib/5.8.4/sparc-solaris -Dsitearch=/app/perl/5.8.4/lib/site_perl/5.8.4/sparc-solaris -Dsitearchexp=/app/perl/5.8.4/lib/site_perl/5.8.4/sparc-solaris -Dlocincpth=/app/gdbm/1.8.0/include /app/db/3.3.11/include /usr/openwin/share/include -Dloclibpth=/app/gcc/3.0.4/lib /app/gdbm/1.8.0/lib /app/db/3.3.11/lib /usr/openwin/lib -Dcc=gcc -Duseshrplib=true -Ubincompat5005'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -I/app/gdbm/1.8.0/include -I/app/db/3.3.11/include -I/usr/openwin/share/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-fno-strict-aliasing -I/app/gdbm/1.8.0/include -I/app/db/3.3.11/include -I/usr/openwin/share/include'
    ccversion='', gccversion='3.0.4', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/app/gcc/3.0.4/lib -L/app/gdbm/1.8.0/lib -L/app/db/3.3.11/lib -L/usr/openwin/lib -R/app/perl/5.8.4/lib -R/app/gcc/3.0.4/lib -R/app/gdbm/1.8.0/lib -R/app/db/3.3.11/lib -R/usr/openwin/lib -L/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE -R/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE -lgdbm '
    libpth=/app/gcc/3.0.4/lib /app/gdbm/1.8.0/lib /app/db/3.3.11/lib /usr/openwin/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R /app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE'
    cccdlflags='-fPIC', lddlflags='-G -L/app/gcc/3.0.4/lib -L/app/gdbm/1.8.0/lib -L/app/db/3.3.11/lib -L/usr/openwin/lib -R/app/perl/5.8.4/lib -R/app/gcc/3.0.4/lib -R/app/gdbm/1.8.0/lib -R/app/db/3.3.11/lib -R/usr/openwin/lib -L/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE -R/app/perl/5.8.4/lib/5.8.4/sparc-solaris/CORE'

Locally applied patches:
    

---
@INC for perl v5.8.4:
    /app/perl/5.8.4/lib/5.8.4/sparc-solaris
    /app/perl/5.8.4/lib/5.8.4
    /app/perl/5.8.4/lib/site_perl/5.8.4/sparc-solaris
    /app/perl/5.8.4/lib/site_perl/5.8.4
    /app/perl/5.8.4/lib/site_perl
    .

---
Environment for perl v5.8.4:
    HOME=/home/eedmja
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/lib:/usr/dt/lib:/usr/openwin/lib:/all/aps/mscr12/lib/runtime:/usr/ucblib
    LOGDIR (unset)
    PATH=/usr/ucb:/bin:/usr/bin:/home/eedmja/bin:.:/all/ste/external/TTCN/Tools/gcc-3.0.4-sol8/bin:/all/ste/ttcn/1.5.pl6/bin:/all/aps/mscr12/bin:/opt/local/bin:/usr/local/bin:/usr/sbin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/home/tool/bin:/usr/atria/bin:/usr/atria/etc:/proj/confix/bin:/usr/openwin/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About