my $data; do { # Get web page my $response = $ua->post( $page, \%form ); # Check for errors if ($response->is_success) { $data = $response->content; } else { sleep 100; } } until (defined($data));
But I don't think that has much real advantage over your code or GrandFather's. Historical abuse of goto has caused a sort of disdain for anything resembling it, but in this case it's as clear as anything else.
In reply to Re: Using REDO in Subroutine, need better way?
by sgifford
in thread Using REDO in Subroutine, need better way?
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |