use strict; use warnings; my ($x, $t); my @n = map (/\.(.*)/, <DATA>); for (0..($#n - 1)) { $x = int(rand() * ($#n - $_ + 1)) + $_; $t = $n[$x]; $n[$x] = $n[$_]; $n[$_] = $t; } for ($_ = 0; $_ < $#n; $_ += 2) { print "Group ".($_ / 2).": ".$n[$_]." and ".$n[$_+1]." are partner +s\n"; } __DATA__ 1.bobby 2.jane 3.charleen 4.markus 5.gabriel 6.Alex
In reply to Re: Random Couple Script
by TedPride
in thread Random Couple Script
by gsr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |