Skip the flowchart. In it you have steps like, "initialize variables". But if you can you don't want to have a ton of variables that you want to initialize. If you must, you must, but you would prefer not to.
Instead go bottom up. Write a function that you know you will need. For instance given a server and a directory, look for images in it. You need that function. It is not hard to write. You can write it without needing any global variables.
When you get done you will have cleaner code that is better factored and easier to modify. For instance you have in your flowchart big grey steps like, "Choose a random directory." How? guess whether it has something like images? Hope it doesn't have an index.html file so you can get a directory listing? Start following random pages looking for links? My guess is that once you are done you will find that that logic needs fixing...
And yes, you did miss something. Something big. You are writing a robot. It is impolite in the extreme to write a robot that fails to look for robots.txt and respect what that file asks you to do. That will require significant changes to your overall logic. What changes? Don't worry about it just yet. Focus on how to use LWP first...
In reply to Re (tilly) 1: Random Image Grabber
by tilly
in thread Random Image Grabber
by bladx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |