|Syntactic Confectionery Delight|
LWP::Simple Seems to Hang on getby svsingh (Priest)
|on Nov 06, 2003 at 22:20 UTC||Need Help??|
svsingh has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to pull some statistics off a Yahoo page using LWP::Simple's get method. I noticed that my script would sometimes seem to hang inconsistently, so I stripped down the program to see if I could identify the problem.
I think get is hanging somewhere, but I don't understand why. I read a few other posts here, but wasn't able to find any advice on how to work around the problem. I don't think it's a timeout issue, because the program isn't running the "or die..." code.
Here's the stripped down script:
I've run the stripped code four times now. The first time, it went through the while loop 7 times. Then 4, 2, and 6. In the current run, it's been working on the same iteration for the past twenty minutes.
I would expect if the request was timing out, that I'd be seeing the "Couldn't get $url." message, but that's no happening. Am I doing something wrong? Thank you.
Update: Changed $leagueURL to refer to real page instead of local file.