You're trying to open a file with a name found in $list[$j] and it may have illegal characters in it for a start, like a slash. So if the first three succeed, what's in the fourth?
Looking at your whole $i and $j business gets me worried. $i is your incrementing variable, and $j is the name of the file you want to write?
But if you're only incrementing $i by one every time, aren't you going to attempt to get a website at a url which is really a filename next time? Like, if your file contains "http://www.yahoo.com" then "Yahoo", you'd get "http://www.yahoo.com" and write it to a file called "Yahoo.txt" on the first run of the loop, but then the next time you're going to try and get "Yahoo" as a URL, which won't work.
Maybe you're doing some kind of poor-man's hash kind of thing? The key is in $list[$i] and the value is in $list[$j]? In which case, just use a hash!
And, even more to the point, this is a very inefficient way to test if a website has changed, if you're really just going for "either it's changed or it hasn't". Just store the length of the content you get from LWP. If it's different, the site has changed.
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print
In reply to Re: Source Grabber
by Cody Pendant
in thread Source Grabber
by Andrew_Levenson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |