in reply to biased random number picking

So, essentially you want to sample w/o replacement. If you don't want to make a complete copy of your array (because it is very large or whatever), you can use the random_permuted_index() method from Math::Random. Another benefit to this module is that (as I understand it), the randomization is 'more random' than for rand; however, it may not be an issue in your case. Also, if you want to keep grabbing two at a time over and over, try splice regardless of how you do your sampling. (Splice is like shift/pop on 'roids.) Here is an example:
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use Math::Random; my @array = qw( cat dog shark frog chimp seahorse ); my @permuted_index = random_permuted_index( scalar(@array) ); print "Here is your entire set:\n"; print Dumper @array; print "Here is a random pick of two:\n"; print Dumper @array[ splice( @permuted_index, 0, 2 ) ]; print "And another two (unique from 1st two):\n"; print Dumper @array[ splice( @permuted_index, 0, 2 ) ]; print "And the final two:\n"; print Dumper @array[ splice( @permuted_index, 0, 2 ) ];

Sample output:

Here is your entire set: $VAR1 = 'cat'; $VAR2 = 'dog'; $VAR3 = 'shark'; $VAR4 = 'frog'; $VAR5 = 'chimp'; $VAR6 = 'seahorse'; Here is a random pick of two: $VAR1 = 'dog'; $VAR2 = 'shark'; And another two (unique from 1st two): $VAR1 = 'seahorse'; $VAR2 = 'frog'; And the final two: $VAR1 = 'cat'; $VAR2 = 'chimp';