in reply to Is a integer or string.

You can use a regular expresion to check that the string only contains digits or use the function looks_like_number($str) from Scalar::Util.