awohld has asked for the wisdom of the Perl Monks concerning the following question:
sub get_html { my %form; my $page; # Get ID ( $form{id}, $page ) = @_; my $data; get_page: { # Get web page my $response = $ua->post( $page, \%form ); # Check for errors if ($response->is_success) { $data = $response->content; } else { sleep 100; redo get_page; } } return \$data; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using REDO in Subroutine, need better way?
by GrandFather (Saint) on Oct 09, 2006 at 03:35 UTC | |
by awohld (Hermit) on Oct 09, 2006 at 03:59 UTC | |
|
Re: Using REDO in Subroutine, need better way?
by sgifford (Prior) on Oct 09, 2006 at 03:59 UTC | |
|
Re: Using REDO in Subroutine, need better way?
by shmem (Chancellor) on Oct 09, 2006 at 06:00 UTC |