![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Delete all hash keys except for n of themby Molt (Chaplain) |
on Oct 25, 2004 at 09:18 UTC ( #402175=note: print w/replies, xml ) | Need Help?? |
One nice way to do this is to treat the hash as array, then take a slice from the array and reassign it. The program below demos this approach.
In Section
Seekers of Perl Wisdom
|
|