in reply to Detecting if a scalar has a number or string

Can you count on stringification to work? So with your overloaded object can you do something like _numberlike("$ref") ?

Matt

  • Comment on Re: Detecting if a scalar has a number or string

Replies are listed 'Best First'.
Re^2: Detecting if a scalar has a number or string
by rrwo (Friar) on Nov 18, 2004 at 18:37 UTC

    Counting on stringification is an interesting idea, but not reliable. Suppose I have a roman numerals class that behaves just like numeric variables, but outputs as roman numerals in string context?