I guess the problem can be easily solved by converting to integer if a
mathematical operation is performed, or a similar behavior.
@array = ("one", "two", 3);
All are now internally strings, though by doing
$array[2] += 0;
It will convert this to an integer, which is not the case at this time.
Again this happens rare enough where we don't have to break our heads over
the behavior and the implementation, just a simple explicit hack will do as
long as it's guaranteed to work:-)
Ilya
-----Original Message-----
From: Dan Sugalski
To: Sterin, Ilya; '[EMAIL PROTECTED] '
Sent: 9/17/01 3:25 PM
Subject: Re: String/Number differentiation
At 11:18 AM 9/17/2001 -0600, Sterin, Ilya wrote:
>I don't know if this has already been discussed, or is out of the
question,
>but I wonder since perl does not currently differentiate between
numbers and
>string, and when it does, it does so very inconsistantly, is there be
any
>hope for any changes/modificatins for Perl 6.
Ah, that's part of the "what flags are set and where did the source
value
come from" bits of perl. Much Evil Magic abounds there. :)
Sure, we can either codify things or define behavior, as need be.
(Assuming, of course, that typed scalars and arrays aren't sufficient
for
the purpose at hand)
Dan
--------------------------------------"it's like
this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk