my @items = ( # 0 [ 'sword', 'mace', 'turtle' ], # 1 [ '+1 sword', '+1 mace', '+1 turtle' ], # 2 [ 'frost sword', 'frost mace', 'frost turtle', 'flame sword', 'flame mace', 'flame turtle' ], ... ); #### my @in_range = map @{$items[$_]}, 3..5; my $item = $in_range[ int rand( @in_range ) ];