Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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?
[dr_jkl]: dumb question, can i use __DATA__ and EOF POD at the same time?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-10-18 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (250 votes). Check out past polls.

    Notices?