Hi sm@sh,
"1"==1, "1" eq 1, and looks_like_number(1) and looks_like_number("1") are all true in Perl. The StackOverflow thread that clueless newbie linked to already contains some excellent answers - especially choroba and ikegami's answers explain the caveats of peeking under the hood. That's why I recommended looking for a different solution to your problem than figuring out difference between 1 and "1".
Regards,
-- Hauke D
In reply to Re^5: How can I test for the representation of an integer?
by haukex
in thread How can I test for the representation of an integer?
by sm@sh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |