$string might be a phone number: 99999999999999999999999999 # see Note 2 $string2 might be a phone number: 9-999-999-999-999-999-999-999-9999 # also see Note 2 stiller's snippet: 999999999.000000 # a float, as stiller noted, this address's OP's problem, 999999999 # whereas, Perl makes it easy to use this as a string