my %rands = (); while(10 > keys %rands) {   my $r = int(rand(100));   $rands{$r} = 1 unless exists $rands{$r}; }