in reply to Re^2: Randomly picking numbers
in thread Randomly picking numbers
...the index is implicitly converted before being used.
...and it does so via truncation:
as opposed to rounding, and that's why it works so well in $arr[rand @arr].% perl -le 'print +(0, 1)[0.999999]' 0
the lowliest monk
|
|---|