- or download this
use List::Util 'shuffle'; - or download this
my @friends = map { (split /\./)[1] } <DATA>;
chomp @friends;
- or download this
@friends = shuffle @friends;
my %couple = (@friends);
- or download this
for (keys %couple) {
print "$_ and $couple{$_} are partners\n";
}
- or download this
__DATA__
1.bobby
2.jane
...
4.markus
5.gabriel
6.Alex