Branch: refs/heads/yves/hex_oct_digit_vars Home: https://github.com/Perl/perl5 Commit: 1753a64dfe1bc135f45981efdbf023b33c689cce https://github.com/Perl/perl5/commit/1753a64dfe1bc135f45981efdbf023b33c689cce Author: Yves Orton <demer...@gmail.com> Date: 2022-07-30 (Sat, 30 Jul 2022)
Changed paths: M t/comp/parser_run.t M t/re/pat.t M toke.c Log Message: ----------- Allow binary and hex "digit" vars, and explicit octal under strict Prior to this patch ${0x10} would require "no strict refs", with this patch it is a legal alternative spelling for $16, likewise with ${0b10000}, and explicit octal (eg, with 0o prefix) as well. Note that ${0x010} and ${0b00010000} and similar are also allowed and will both also map to $16. Since these values are constant it seems reasonable to treat them like their decimal equivalents. Note that $0x10 does not work as one might think, it parses as $0 x 10, only ${0x10} is allowed, similarly $0b10 is forbidden, but ${0b10} is not. Note that $::0x10 and $::0b10 are NOT digits vars equivalent to $16 and $2, but rather $main::0x10 and $main::0b10.