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

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

Thread Previous | Thread Next
"Konovalov, Vadim" via perl5-porters
July 24, 2022 08:38
RE: perl -we '$00' dies in 5.32
Message ID:
> 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,

Internal Use - Confidential

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About