develooper Front page | perl.perl5.porters | Postings from July 2022

Re: perl -we '$00' dies in 5.32

Thread Previous | Thread Next
From:
James E Keenan
Date:
July 22, 2022 14:00
Subject:
Re: perl -we '$00' dies in 5.32
Message ID:
995c1b35-4646-2756-86df-40da4c8952dc@pobox.com
On 7/22/22 09:23, Konovalov, Vadim via perl5-porters wrote:
> My scripts suddenly stopped working in newer perl because they use $00 
> variable.
> 
> $ perl -we '$00'
> 
> Numeric variables with more than one digit may not start with '0' at -e 
> line 1.
> 
> $ perl -v
> 
> This is perl 5, version 32, subversion 1 (v5.32.1) built for 
> i686-cygwin-threads-64int-multi
> 
> (with 7 registered patches, see perl -V for more detail)
> 
> Copyright 1987-2021, Larry Wall
> 
> Perl may be copied only under the terms of either the Artistic License 
> or the
> 
> GNU General Public License, which may be found in the Perl 5 source kit.
> 
> Complete documentation for Perl, including FAQ lists, should be found on
> 
> this system using "man perl" or "perldoc perl".  If you have access to the
> 
> Internet, point your browser at http://www.perl.org/ 
> <http://www.perl.org/>, the Perl Home Page.
> 
> This works well in 5.26.0

It worked "well" prior to 5.32 only if your definition of "working well" 
includes ignoring warnings.

#####
$ perlbrew use perl-5.30.0
$ perl -we '$00'
Useless use of a variable in void context at -e line 1.
#####


> 
> What this behaviour degrade was for?
> 

#####
commit 60267e1d0e12bb5bdc88c62a18294336ab03d4b8
Author:     Yves Orton <demerphq@gmail.com>
AuthorDate: Thu Feb 6 08:40:57 2020 +0100
Commit:     Yves Orton <demerphq@gmail.com>
CommitDate: Mon Feb 10 04:18:34 2020 +0100

toke.c - handle ${10} properly - Issue #12948

${10} and $10 were handled differently, this patch makes them be handled 
the same. It also forbids multi-digit numeric variables from starting 
with 0. Thus $00 is now a new fatal exception

    "Numeric variables with more than one digit may not start with '0'"
#####

https://github.com/Perl/perl5/issues/12948

Thread Previous | 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