@matching{@names} = shuffle(@names); # Match 'em up # No one has themselves foreach (@names) { next GENERATE if $_ eq $matching{$_}; } #### %matching = ( map { $_, $_ } @names )[ 1..@names*2-1, 0 ]; #### push @digest, md5_hex($_, '=>', $matching{$_}); #### push @digest, md5_hex(join '<=>', sort $_, $matching{$_});