my @set = qw( apple orange banana cucumber ); my $random = $set[rand(@set)];