Changing this means changing Scalar::Util::looks_like_number. Would that break things? Also, it could break things that use the regex patterns provided in perldata to (effectively) recreate looks_like_number. On Thu, Jun 27, 2019 at 10:35 AM Dan Book (via RT) < perlbug-followup@perl.org> wrote: > # New Ticket Created by Dan Book > # Please include the string: [perl #134230] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=134230 > > > > When starting with a string that looks like '0xFF', numifying it should > truncate it to 0 - consistent with 0b and 0 which only have an effect on > bare number parsing. This behavior seems to have changed in 5.30. > > 5.28: > > perl -Mwarnings -e 'print "0xFF" + 0, "\n"' > Argument "0xFF" isn't numeric in addition (+) at -e line 1. > 0 > > 5.30: > > perl -Mwarnings -e 'print "0xFF" + 0, "\n"' > Argument "0xFF" isn't numeric in addition (+) at -e line 1. > 255 > > It also seems to have had this behavior way back in 5.6: > > perl -Mwarnings -e 'print "0xFF" + 0, "\n"' > Argument "0xFF" isn't numeric in addition (+) at -e line 1. > 255 > > -Dan > >Thread Previous | Thread Next