in reply to Re^2: Fun with Numbers
in thread Fun with Numbers

What I was getting at, is that in general perl promotes a number at the start of a string to the same number as if it was a literal. I was suggesting that since it doesn't in this case, you could consider it a bug.

I do consider it a bug, but I would not consider changing the current behaviour before perl6, because of backward compatibility. It would break too subtly in too many scripts.

As an example of "working" DWIM:

my $i = 1234e3; my $j = "1234e3"; print join("\n",$i, $j, 0+$i, 0+$j);