I'd assume you'd get an *alias* to a random pair:

  # Test error-correction
  for 1..$entropy_threshhold {
     %hash.pick.value = rand $scribble_factor;
  }

Trey

In a message dated Mon, 4 Apr 2005, Ingo Blechschmidt writes:

> Hi,
>
>
> I remembered Damian saying that pick does not only work on junctions,
> but on arrays and hashes, too (and I even found his posting :):
> http://groups.google.com/groups?selm=420DB295.3000902%40conway.org).
>
> Are the following assumptions correct?
>   my $junc = 1|2|3;
>   print $junc.pick; # "1", "2", or "3"
>   print pick $junc; # same
>
>   my @array = <a b c>;
>   print @array.pick; # "a", "b", or "c"
>   print pick @array; # same
>
> What does pick return on hashes? Does it return a random value or a
> random pair? (I suppose returning a pair is more useful.)
>
>
> --Ingo
>
>

-- 

Reply via email to