Hi Cody,
People have come up with a bunch of interesting suggestions which probably solve your problem. However, in the spirit of TMTOWTDI, here's a lazy-programmer's solution:
- Store the most recent ones you've done in a hash, and save using Storable.
- Clear the hash every n runs, store the count of runs-since-last-clear in a scalar, and save it using Storable.
- In each run: do {pick a number} until (! exists $hash{this number})
Of course, you can only have one of these running at one time, or you'll shoot yourself in the foot.
hth!
andye