On Thursday 08 July 2004 05:25, Larry Wall wrote:
> : say @x[rand];  # how about now?
>
> Well, that's always going to ask for @x[0], which isn't a problem.
> However, if you say rand(@x), it has to calculate the number of
> elements in @x, which could take a little while...
I'd expect to be rand(@x) = rand(1)[EMAIL PROTECTED] = rand(1)*Inf = Inf or NaN.

Case 1 (Inf) would give Inf (which can be argued, since infinite many more 
elements are bigger than any given finite number), and case 2 could give an 
exception ...


Regards,

Phil

Reply via email to