The output you've posted did not come from the code that you posted.
Running the code you posted, (second code block) under 5.10 and 5.18 I get this output:
The 1 is a whole number The 1 is a whole number The 123.1 has nondigits The 0.1 has nondigits
I suspect the code you actually ran to get the output you posted included:
my @numbers = qw(1, 1.0, 123.1, 0.1);
And did not have warnings enabled.
But that doesn't explain all the differences.
Try posting the actual code you run; and the actual output you get.
In reply to Re: How do I determine with a regular expression whether a scalar is a number/whole/integer/float?
by BrowserUk
in thread [SOLVED] How do I determine with a regular expression whether a scalar is a number/whole/integer/float?
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |