I also changed the criteria for success to check for 'definedness', because the LWP::Simple::get() function will explictly return undef if it fails.use strict; use LWP::Simple; my $data = ""; my $try_count = 0; while ($try_count++ < 5) { $data = LWP::Simple::get('http://somedomain/'); last if defined $data; print "were is this file?\n"; sleep(5); };
In reply to Re^2: Always Looping
by reasonablekeith
in thread Always Looping
by jesuashok
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |