develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #134230] Numifying a 0x string evaluates the hex number

Thread Previous | Thread Next
From: via RT
June 28, 2019 10:36
[perl #134230] Numifying a 0x string evaluates the hex number
Message ID:
On Thu, 27 Jun 2019 22:34:32 -0700, wrote:
> Changing this means changing Scalar::Util::looks_like_number. Would that
> break things?

I agree that looks_like_number()also needs to be thought about.

Perl's current behaviour is to issue the "isn't numeric" warning when "0xff"+0 is evaluated.
However, I doubt that such a warning is valid now that "0xff" is numified to 255.
It was certainly a valid warning when "0xff" numified to 0 ... but I'm thinking that warning should not be emitted for the current behaviour, and nor should looks_like_number("0xff") return FALSE.


via perlbug:  queue: perl5 status: open

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