in reply to Drawing samples from a set

Something very similar to this was discussed before; you might something useful in this thread.

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.