in reply to RE: RE: (Ovid) Re: General quesion
in thread General quesion

But rand($#myarray) returns 0..50 not 0..51. $#array in a scalar context is always one less than @array in a scalar context.

So, the idiom is:

$random_item = $array[rand @array];

Just cut-n-paste that!

-- Randal L. Schwartz, Perl hacker