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

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

Thread Previous | Thread Next
From:
Bram
Date:
July 23, 2022 14:07
Subject:
Re: perl -we '$00' dies in 5.32
Message ID:
62DC00BC.9030609@perl.wizbit.be
On 22/07/2022 21:47, Konovalov, Vadim via perl5-porters wrote:
> The $00 behaviour change - was it mentioned in perldelta?
>   
The change was first included in perl 5.31.9 but skimming the perldelta
of 5.32.0 it does not appear to list the change..


> I wonder whether it was possible to improve $10 processing whereas for the old behaviour to remain for $00 ?
>   
I've added a comment in the github issue (
https://github.com/Perl/perl5/issues/12948 ) to describe what problems
it solved/tried to solve;
the short story is that something like: `${0...}` is a can of worms and
has confusing behavior (even today imo)..

While fixing `${10}` to mean `$10` might be possible it would still
cause surprise and (incorrect results) for things like:

    $010 = "foo";
    print ${010};  # wrong, '010' is/was parsed as octal meaning it maps
    to $8 and not the (probably) expected $010


Best regards,

Bram

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