in reply to Choose random element of array?

Something like this will work:

int rand (@arr) will get you a random index for in @arr's range, and then you can just print it out with  $arr[int rand (@arr)]

E.G.:

perl -le '@arr = 10..19; print $arr[int rand@arr]'