in reply to Re: Exploiting Perls idea of what is a number
in thread Exploiting Perls idea of what is a number

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
  • Comment on Re^2: Exploiting Perls idea of what is a number

Replies are listed 'Best First'.
Re^3: Exploiting Perls idea of what is a number
by rovf (Priest) on Jul 09, 2008 at 06:44 UTC
    what should be done with strings like '3567rubb13h'

    At the moment, this type of strings won't be a problem, but if they appear (for example, with (the same) measurement unit appended, such as "450KB"), it would be fine to have them interpreted as number.

    -- 
    Ronald Fischer <ynnor@mm.st>