in reply to Where is the zero coming from?
I think you need to read the perldoc for the rand() function:
linux> perldoc -f rand
perl -e '@choices = qw|a b c d e|; print rand(@choices) . qq|\n|;' 0.785222268100387
It doesn't return a random element from your list.
Since your question reads so much like homework I'll leave you with this:
Celebrate Intellectual Diversity
|
|---|