P is for Practical | |
PerlMonks |
Re^3: Long url to tiny url.by RMGir (Prior) |
on Jul 07, 2007 at 10:49 UTC ( [id://625407]=note: print w/replies, xml ) | Need Help?? |
Very nice. That would work quite well, yes.
A better variant might be to seed some random number generator with a very long period, then generate the output strings -- that way, the consecutive tinyurl's wouldn't be predictable, and it would still be just as cheap to pre-generate them. If the generator can take its output as its seed, then all you need to do is save the last output value so you can restart the generator when it's time to generate the next set... Mike
In Section
Seekers of Perl Wisdom
|
|