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

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

Thread Previous
From:
"Konovalov, Vadim" via perl5-porters
Date:
July 22, 2022 13:37
Subject:
RE: perl -we '$00' dies in 5.32
Message ID:
PH0PR19MB503604D12349135342EAE03A8A909@PH0PR19MB5036.namprd19.prod.outlook.com
> > 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.
> 
> You can try wrapping them in ${} and they'll work again, i.e.:
> 
> $ docker run
> -it --rm perl:5.36 perl -E'$00="foo";say"$00"'
> Numeric variables with more than
> one digit may not start with '0' at -e line 1.
> 
> $ docker run -it --rm perl:5.36
> perl -E'${00}="foo";say"${00}"'
> foo
> 
> The ${00} syntax also works in previous
> Perls, from what I can tell.

Yes, it even allows empty string '' as scalar names.

The question was not about how can I edit my scripts to be compatible with 5.32.0.

What for this regression was introduced?


Internal Use - Confidential

Thread Previous


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