Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: generating random filenames

by PrakashK (Pilgrim)
on Jul 10, 2001 at 19:36 UTC ( #95330=note: print w/replies, xml ) Need Help??


in reply to generating random filenames

for ($current_length = 1; $current_length >= $length_limit; $curre +nt_length++) { .... }
This loop never executes, because of incorrect checking of $current_length. Change the >= to <=:
for ($current_length = 1; $current_length <= $length_limit; $curre +nt_length++) { .... }
Or, better yet:
for $current_length (1 .. $length_limit) { .... }
/prakash

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95330]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-12-11 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.