fork(1) download
  1. #!/usr/bin/perl
  2.  
  3. my $count = 0;
  4. my %dict = ();
  5. while (scalar keys %dict < 10) {
  6. $dict{int(rand(10))} = 1;
  7. $count ++;
  8. }
  9.  
  10. print $count;
Success #stdin #stdout 0s 6000KB
stdin
Standard input is empty
stdout
16