Front page | perl.perl5.porters |
Postings from December 2010
[perl #81426] Can't parse array indexing in regexes for certain indexes
Thread Next
From:
Moritz Lenz
Date:
December 28, 2010 22:35
Subject:
[perl #81426] Can't parse array indexing in regexes for certain indexes
Message ID:
rt-3.6.HEAD-5425-1293604021-888.81426-75-0@perl.org
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #81426]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81426 >
This is a bug report for perl from moritz@faui2k3.org,
generated with the help of perlbug 1.39 running under perl 5.12.1.
-----------------------------------------------------------------
$ perl -Mstrict -cE 'my @s; m/$s[998]/'
Global symbol "$s" requires explicit package name at -e line 1.
-e had compilation errors.
$ perl -Mstrict -cE 'my @s; m/$s[1]/'
-e syntax OK
Depending on the number used within the subscript, strict.pm complains
or does not complain about $s not being declared. I guess it means the
[998] is not parsed as an array subscript, although it should.
Curiously it works fine with index 1 and 99, but not with 100.
perl 5.10.1 shows the same behaviour.
(This bug report originated in a discussion on perlmonks, see
http://www.perlmonks.org/?node_id=869313 ).
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.12.1:
Configured by moritz at Sun Oct 3 20:56:58 CEST 2010.
Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32-5-686, archname=i686-linux
uname='linux trudi 2.6.32-5-686 #1 smp sat sep 18 02:14:45 utc 2010
i686 gnulinux '
config_args='-de -Dprefix=/home/moritz/perl5//perls/perl-5.12.1'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.4.5 20100728 (prerelease)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Locally applied patches:
---
@INC for perl 5.12.1:
/home/moritz/cpan/lib
/home/moritz/perl5//perls/perl-5.12.1/lib/site_perl/5.12.1/i686-linux
/home/moritz/perl5//perls/perl-5.12.1/lib/site_perl/5.12.1
/home/moritz/perl5//perls/perl-5.12.1/lib/5.12.1/i686-linux
/home/moritz/perl5//perls/perl-5.12.1/lib/5.12.1
.
---
Environment for perl 5.12.1:
HOME=/home/moritz
LANG=en_US.UTF-8
LANGUAGE=C
LC_CTYPE=de_DE.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/moritz/perl5//bin:/home/moritz/perl5//perls/current/bin:/bin:/sbin:/usr/bin:/usr/sbin:/home/moritz/bin:/usr/games:/usr/bin/X11:/usr/local/bin:/home/moritz/rakudo/parrot_install/bin
PERL5LIB=/home/moritz/cpan/lib
PERLBREW_ROOT=/home/moritz/perl5/
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #81426] Can't parse array indexing in regexes for certain indexes
by Moritz Lenz