perl -wle'undef $x{rand()} while keys(%x) == $x++; print $x'