in reply to Generating 2 unique random integers (So I can't pop a list...)

Why create the temporary array?
my $r1 = 1 + int(rand(10)); my $r2 = 1 + int(rand(10)); $r2 = 1 + int(rand(10)) while $r1 == $r2;
  • Comment on Re: Generating 2 unique random integers (So I can't pop a list...)
  • Download Code