Skip Menu |
Report information
Id: 129122
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: andreas.koenig.7os6VVqR [at]

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: 5.25.5

From: Andreas Koenig <andreas.koenig.7os6VVqR [...]>
Date: Mon, 29 Aug 2016 06:59:52 +0200
To: perlbug [...]
Subject: Unexpected binary operator '+' with no preceding operand in regex
Download (untitled) / with headers
text/plain 4.2k
Thread was started by John Imrie as "Bug or feature?" on Not everybody can reproduce. I could with this program up to current blead (v5.25.4-22-g2b6a5bf): no warnings qw<experimental>; use experimental qw<regex_sets>; $q = qr/(?[ ( ( [ABC] - [B] ) + ( [abc] - [b] ) ) + [def] ])/; $r = qr/(?[ ( [ABC] - [B] ) + ( [abc] - [b] ) + [def] ])/; Bisected to: 6798c95dd27b33efd71f394c18649af7bbaf42b7 is the first bad commit commit 6798c95dd27b33efd71f394c18649af7bbaf42b7 Author: Karl Williamson <> Date: Wed Feb 25 23:19:39 2015 -0700 Change /(?[...]) to have normal operator precedence This experimental feature now has the intersection operator ("&") higher precedence than the other binary operators. perl -V ------- Summary of my perl5 (revision 5 version 21 subversion 10) configuration: Commit id: 6798c95dd27b33efd71f394c18649af7bbaf42b7 Platform: osname=linux, osvers=4.3.0-1-amd64, archname=x86_64-linux-thread-multi-ld uname='linux k83 4.3.0-1-amd64 #1 smp debian 4.3.3-7 (2016-01-19) x86_64 gnulinux ' config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Dlibswanted=cl pthread socket inet nsl gdbm dbm malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat -Duseithreads -Duselongdouble -DDEBUGGING=-g' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='5.3.1 20160121', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8 alignbytes=16, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.21' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_LONG_DOUBLE USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Aug 29 2016 06:55:01 @INC: /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/site_perl/5.21.10/x86_64-linux-thread-multi-ld /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/site_perl/5.21.10 /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/5.21.10/x86_64-linux-thread-multi-ld /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/5.21.10 . -- andreas
RT-Send-CC: perl5-porters [...]
Now fixed by c333712c4a550eeb3146b964d8508f772e294a49 -- Karl Williamson
Download (untitled) / with headers
text/plain 313b
Thank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been resolved. Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at