sub lots_o_indexes { my($count)=@_; my @indexlist; foreach (1..$count) { push @indexlist, weighted_rand(@weights); } return @indexlist; }