Dr.Ruud wrote: > Rob Dixon schreef: > >> A scalar cannot have multiple 'personalities' - it can have a maximum >> of two (its inherent type and a string equivalent) at any one time, >> but usually has only one. > > It can at least have 3: an integer numeric one, a floating numeric one, > and a string one. It can have more.
No. It can be just a string; an integer and a string; a double and a string; or a reference (pointer) and a string. After that there's some weird stuff that goes on with tied scalars and so on. Basically every scalar data type keeps space for a pointer to its string equivalent as well, presumably because it's a useful thing to remember once it has been evaluated once. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/