Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 cooling their heels in the Monastery: (7)
As of 2014-12-27 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls