in reply to Question on converting big numbers to strings without rounding

Perl doesn't really differentiate between numbers and strings. Input a string, process a string, don't think of the phone-number as anything but a string.
  • Comment on Re: Question on converting big numbers to strings without rounding

Replies are listed 'Best First'.
Re^2: Question on converting big numbers to strings without rounding
by jettero (Monsignor) on Feb 12, 2008 at 14:27 UTC
    I'm pretty sure perl keeps track of the difference somewhat. That's the only way to explain the existence of "looks_like_number" in both Scalar::Util and perlapi. Although it's not "isnumber" and "isstring," it's "looks_like_number," so I could be wrong.

    -Paul

      You are correct, but I was over-simplifying to address the question at hand. There is no reason a 'phone-number' should be treated as a number.

      Perhaps I should simply have said "Just because it looks like a number doesn't mean it shouldn't be treated as a string."