in reply to Re^2: GOTO or not GOTO
in thread GOTO or not GOTO
You don't say why you find the goto version more attractive. I guess because of the separate declaration and initialization of $status. However:
my $status; do { $status = getstore (ask_url (), $file); } while $status == 200 && !-s $file && --$max_tries > 0;
makes it clear that there is a loop involved and what the conditions on the loop are. Having $status declared outside the loop makes it clear that $status is required after the loop has terminated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: GOTO or not GOTO
by JavaFan (Canon) on Jan 27, 2009 at 22:17 UTC |