RT #134491: string increment fails

# rira...@com... <rira...@com...>

Wed, 09 Oct 2019 22:31:38 -0700
This is a bug report for perl from rirans@comcast.net, generated with the help of perlbug 1.41 running under perl 5.31.4. ----------------------------------------------------------------- [Please describe your issue here] String increment is sensitive to string value. Thanks for the software! rir #!/usr/bin/perl use warnings; use strict; my @w = qw( line_no00 line_no LINE_NO line__ line_junk line__x __LINE__ _line__ line____what ____line ____something_line______ somethingline______________________otherthing__ somethingLINE_otherthing ); for my $w ( @w) { print "$w ==> "; $w++; print $w, $/; } __DATA__ Argument "line_no00" isn't numeric in preincrement (++) at x line 24. line_no00 ==> 1 Argument "line_no" isn't numeric in preincrement (++) at x line 24. line_no ==> 1 Argument "LINE_NO" isn't numeric in preincrement (++) at x line 24. LINE_NO ==> 1 Argument "line__" isn't numeric in preincrement (++) at x line 24. line__ ==> 1 Argument "line_junk" isn't numeric in preincrement (++) at x line 24. line_junk ==> 1 Argument "line__x" isn't numeric in preincrement (++) at x line 24. line__x ==> 1 Argument "__LINE__" isn't numeric in preincrement (++) at x line 24. __LINE__ ==> 1 Argument "_line__" isn't numeric in preincrement (++) at x line 24. _line__ ==> 1 Argument "line____what" isn't numeric in preincrement (++) at x line 24. line____what ==> 1 Argument "____line" isn't numeric in preincrement (++) at x line 24. ____line ==> 1 Argument "____something_line______" isn't numeric in preincrement (++) at x line 24. ____something_line______ ==> 1 Argument "somethingline______________________otherthing__" treated as 0 in increment (++) at x line 24. somethingline______________________otherthing__ ==> 1 Argument "somethingLINE_otherthing" treated as 0 in increment (++) at x line 24. somethingLINE_otherthing ==> 1 [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=high --- Site configuration information for perl 5.31.4: Configured by rir at Thu Oct 10 00:36:14 EDT 2019. Summary of my perl5 (revision 5 version 31 subversion 4) configuration: Platform: osname=linux osvers=4.9.0-8-amd64 archname=x86_64-linux uname='linux rat 4.9.0-8-amd64 #1 smp debian 4.9.130-2 (2018-10-27) x86_64 gnulinux ' config_args='-de -Dprefix=/home/rir/perl5/perlbrew/perls/perl-5.31.4 -Dusedevel -Aeval:scriptdir=/home/rir/perl5/perlbrew/perls/perl-5.31.4/bin' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='6.3.0 20170516' 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='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 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/6/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 -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.24.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.24' 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-strong' Locally applied patches: Devel::PatchPerl 1.46 --- @INC for perl 5.31.4: /home/rir/Monet/Src/Monet/lib /home/rir/migate/lib //home/rir/Maker/Dist/Maker/lib /home/rir/lib /home/rir/LedgerSMB/lib /home/rir/LedgerSMB/old/lib /home/rir/Monet/Src/Monet/lib /home/rir/migate/lib //home/rir/Maker/Dist/Maker/lib /home/rir/lib /home/rir/LedgerSMB/lib /home/rir/LedgerSMB/old/lib /home/rir/perl5/perlbrew/perls/perl-5.31.4/lib/site_perl/5.31.4/x86_64-linux /home/rir/perl5/perlbrew/perls/perl-5.31.4/lib/site_perl/5.31.4 /home/rir/perl5/perlbrew/perls/perl-5.31.4/lib/5.31.4/x86_64-linux /home/rir/perl5/perlbrew/perls/perl-5.31.4/lib/5.31.4 --- Environment for perl 5.31.4: HOME=/home/rir LANG=en_US.utf8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/rir/perl5/perlbrew/bin:/home/rir/perl5/perlbrew/perls/perl-5.31.4/bin:/home/rir/bin:/home/rir/rakudo/install/bin:/home/rir/rakudo/install/share/perl6/site/bin:/home/rir/bin:/home/rir/rakudo/install/bin:/home/rir/rakudo/install/share/perl6/site/bin:/home/rir/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PERL5LIB=/home/rir/Monet/Src/Monet/lib:/home/rir/migate/lib://home/rir/Maker/Dist/Maker/lib:/home/rir/lib:/home/rir/LedgerSMB/lib:/home/rir/LedgerSMB/old/lib:/home/rir/Monet/Src/Monet/lib:/home/rir/migate/lib://home/rir/Maker/Dist/Maker/lib:/home/rir/lib:/home/rir/LedgerSMB/lib:/home/rir/LedgerSMB/old/lib PERLBREW_BASHRC_VERSION=0.78 PERLBREW_HOME=/home/rir/.perlbrew PERLBREW_MANPATH=/home/rir/perl5/perlbrew/perls/perl-5.31.4/man PERLBREW_PATH=/home/rir/perl5/perlbrew/bin:/home/rir/perl5/perlbrew/perls/perl-5.31.4/bin PERLBREW_PERL=perl-5.31.4 PERLBREW_ROOT=/home/rir/perl5/perlbrew PERLBREW_VERSION=0.78 PERL_BADLANG (unset) PERL_HASH_SEED=A1CD5A3 PERL_PERTURB_KEYS=0 SHELL=/bin/bash

# Dan Book <grin...@gma...>

Thu, 10 Oct 2019 00:44:45 -0700
All of these strings contain underscores, which renders them ineligible for string increment, as documented. https://perldoc.pl/perlop#Auto-increment-and-Auto-decrement -Dan

# The RT System itself <>

Thu, 10 Oct 2019 00:44:45 -0700
Status changed from new to open.

# rira...@com... <rira...@com...>

Thu, 10 Oct 2019 12:44:54 -0700
Dan, Thanks again. I appreciate the education and that it is off mission. rir On Thu, Oct 10, 2019 at 12:44:45AM -0700, Dan Book via RT wrote: > All of these strings contain underscores, which renders them ineligible for string increment, as documented. https://perldoc.pl/perlop#Auto-increment-and-Auto-decrement > > -Dan

# Karl Williamson <...@cpa...>

Thu, 10 Oct 2019 16:07:19 -0700
As stated in the discussion this is not a bug -- Karl Williamson

# Karl Williamson <...@cpa...>

Thu, 10 Oct 2019 16:07:19 -0700
Status changed from open to rejected.