Sounds like a good use for eval. You could even pull everything into one script:
$step_1 = 0; $step_2 = 0; $step_3 = 0; $working = 1; while( $working ) { eval { $step_1 || first(); $step_2 || second(); $step_3 || third(); clean_up(); }; if( $@ ) { print STDERR $@; } else { $working = 0; } }
update Err, make that $step_1 ||= first() ...
-derby
In reply to Re: Best method for failure recovery?
by derby
in thread Best method for failure recovery?
by Maestro_007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |