What's the point of your request? Are you trying to void two lines? Easy:
sub pick_one { $_[rand(@_)] } while (<>) { chomp; print(pick_one(split(/,/)), "\n"); }
In reply to Re: Pick random item from list of unknown length?
by ikegami
in thread Pick random item from list of unknown length?
by Cody Fendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |