in reply to sorting numbered words
And later you're having to sort these tokens. If you insteadmy $counter = 1; foreach (lameExcuse()){ $token = 'text' . $counter++; doSomethineWith($token)}
You'll generate tokens text00001 text00002 text00003... which sort quite nicely up to 100K tokens.my $token = 'text00001'; foreach (lameExcuse()){ doSomethineWith($token++)}
throop
Actually, it works OK beyond 100K; you just roll over to 'texu00000'
|
|---|