My first thoughts were in the direction of Scalar::Util::looks_like_number, too ... but that always leads to the consideration of what should be done with strings like '3567rubb13h'. Perl will numify that to 3567, yet Scalar::Util::looks_like_number will tell you that it *doesn't* look like a number. (It amuses me that perl is capable of bestowing a non-zero numerical value on something that doesn't even "look like a number".)
Does
rovf want such a string to be kept as a string ? or should it instead be numified to 3567 ?
Cheers,
Rob