Pathologically Eclectic Rubbish Lister | |
PerlMonks |
for loop over large BLOCK keeps failingby cdherold (Monk) |
on May 02, 2001 at 11:45 UTC ( [id://77257]=perlquestion: print w/replies, xml ) | Need Help?? |
cdherold has asked for the wisdom of the Perl Monks concerning the following question:
brothers, the code I have below works great except for one thing, when I put a for loop around it (the first one that goes to $loop=4) it fails completely. Without the loop it goes along and finds all the links on a given webpage, stores those links in an array and then goes into each link to determine if the news article there is something I want to keep ... if it is, the article gets copied and mailed to me. why does it keep crashing when I put the for loop around the entire program???!! When I run the for loop by itself at top with a simple print statement BLOCK it goes ahead and executes everything as expected, but it fails when I make the entire rest of the program the BLOCK. I need the entire program BLOCK to be reiterated over and over so I can keep up to date on the press releases, but without having to go and call the program. I intend to put a "sleep" statement in so that it only loops every hour, but if I can't get it to loop then I guess I won't have to worry about that. the script has been editted for brevity. the loop to 4 is just for testing purposes. i thought very hard about not including this length of code, but think it is necessary to address the problem. Let me know if I have overstepped proper posting length bounds. thanks, cdherold
Back to
Seekers of Perl Wisdom
|
|