BTW, for looking up perl functions, I usually use
http://www.perldoc.com/perl5.6/pod/perlfunc.html. If you want to get non-contiguous values, you're probably best off putting them all into an array, and then choosing an array index at random.
edit: See if this works for you..
Code:
sub getrand
{
return $_[rand @_];
}
$x = getrand (1002, 3023, 91982);
print "item is $x\n";