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

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

Thread Previous | Thread Next
From:
"Konovalov, Vadim" via perl5-porters
Date:
July 24, 2022 08:38
Subject:
RE: perl -we '$00' dies in 5.32
Message ID:
PH0PR19MB503686B1CFD2F3527C867E3A8A929@PH0PR19MB5036.namprd19.prod.outlook.com
> 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

Obviously you're thinking of $00, $010, etc as result holders after regexp match.

However $0 does not have any relation to regular expression.
And $00 name was used by me as global variable which is a "variation" of $0.
like $i and $i0.

Although - not a big deal actually, but I would recommend to return old behaviour, so to improve backward compatibility with older perls.

Some my scripts broke, so there is a possibility that I am not the only one person on planet who happen to use $00 variable name.

Best regards,
Vadim

Internal Use - Confidential

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