in reply to Randomly working script using LWP::Simple

You should check the returned value from get -
$settingstext = get($settingsurl) or die "Can not fetch URL!";
What you could do is to repeat the get process until you succeed. You will probably need to implement some sort of retry timeout or number of retries to limit your loop.

And also you should try to use the more capable LWP::UserAgent or WWW::Mechanize instead.

Replies are listed 'Best First'.
Re: Re: Randomly working script using LWP::Simple
by diotalevi (Canon) on Nov 28, 2003 at 16:31 UTC
    Er, no. LWP::Simple uses LWP::UserAgent. It just takes care of alot of the drudge-work. That said, getstore() is a more appropriate function than get().