|Subject:||Re: AW: AW: How do I pick one random element from an array?|
|Date:||Tue, 03 Nov 2009 18:24:25 +1000|
On Tue, 03 Nov 2009 17:48:55 +1000, Thomas Bätzler <t.baetzler@xxxxxxxxxx> wrote:
Dave Tang <d.tang@xxxxxxxxxxxxx> asked:Just a quick question, how does Perl interpret something like $array[0.7995038473872]?Just like $array[ int(0.7995038473872) ], i.e. the floating point number is coerced into an integer value by cutting off the decimal places.
Ah cool. So when using rand in this aspect (i.e. getting random indexes from an array), the int is negligible?
Thanks Thomas! Cheers, Dave
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: How do I pick one random element from an array?, John W. Krahn|
|Next by Date:||Re: How do I pick one random element from an array?, Philip Potter|
|Previous by Thread:||AW: AW: How do I pick one random element from an array?, T Baetzler|
|Next by Thread:||Re: AW: AW: How do I pick one random element from an array?, Uri Guttman|
|Indexes:||[Date] [Thread] [Top] [All Lists]|