smanicka has asked for the wisdom of the Perl Monks concerning the following question:
the script is here.728050
Could anyone help me optimise it?UPDATE: am working on condensing the code.sorry for any inconvinience.I will condense and put it in my question.
i would like to know if there is a way to handle errors such that the program does its best to continue without interuppting the process and id it cannot, then it calls the on_error subroutine which just calls an external batch file Thanks - Sandhyaforeach my $file (@files){ ...#perform parsing and lookup from database to determine where to +place the file. if (!-e $dir){ mkdir(...) or die("..."); } move(...) or die("..."); ... } sub on_error(){ ##call a batch file }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how do i force a script to execute even when it encounters an error?
by ikegami (Patriarch) on Feb 23, 2009 at 17:00 UTC | |
|
Re: how do i force a script to execute even when it encounters an error?
by Corion (Patriarch) on Feb 23, 2009 at 16:54 UTC |