Re: Pulling random elements from hash
by
George_Sherston
on
Jun 22, 2003 at 21:17 UTC
(
replies
)
http://qs1969.pair.com?node_id=267989
in reply to
Pulling random elements from hash
Yet another way to do it:
print $hash{$_} for (sort {rand() <=> 0.5} keys %hash)
§
George Sherston
In Section
Seekers of Perl Wisdom