in reply to Re: How can I test for the representation of an integer?
in thread How can I test for the representation of an integer?
Trouble with that is it treats both 1, and '1' (and 1.0 and '1.0') as looking like numbers (albeit with strangely different values of true)
use Scalar::Util qw(looks_like_number);; [0] Perl> print looks_like_number( $_ ) for 1, '1', 1.0, '1.0', '1o';; 4352 1 8704 5 0
But the OP wants to distinguish between 1 stored internally as an integer; and '1' stored internally as a string.
|
|---|