in reply to Iterating through string combinations
I am working on something similar. For your example you would only need my incrementation loop.. Took me a while to solve the same problem.
For me it's a subroutine in a larger forking script. I hope this helps you!sub forward { while ($cookieforward[0] < 91) { while ($cookieforward[$#cookieforward - $oldforwardcount] > 90 ) { if ($cookieforward[0] > 90) { last } else { $cookieforward[$#cookieforward - $oldforwardcount] = $cookiefo +rward[$#cookieforward - $forwardcount ]; $cookieforward[$#cookieforward - $forwardcount] = &increase($c +ookieforward[$#cookieforward - $forwardcount]); $oldforwardcount = $forwardcount; $forwardcount = $forwardcount + 1; } } $forwardcount = 1; $oldforwardcount = 0; print "Forward Cookie to return:"; foreach $crumb (@cookieforward) { print chr($crumb); } print "\n"; } }
Dave -- Saving the world one node at a time
|
|---|