to: $num = $choices[ rand(@choices) ];
rand(@choices) will give you a random index (from 0 to 48).
Update: Changed @choices[ rand(@choices) ]; to $choices[ rand(@choices) ];
In reply to Re: Where is the zero coming from?
by Cristoforo
in thread Where is the zero coming from?
by Pauleduc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |