Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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


Comment on Re: generating random filenames
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2014-07-29 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls