# Read names, chop off numbers my @names = map /\.(.*)/, ; # Pair them up randomly for (1..@names/2) { printf "Group $_: %s and %s are partners\n", splice(@names, rand(@names), 1) , splice(@names, rand(@names), 1); } #### printf "Group $_: %s and %s are partners\n", shift(@names), splice(@names, rand(@names), 1);