in reply to looking for suggestion!!!
Get a better keyboard that doesn't repeat punctuation characters.
Don't use C for loops. Avoid rewriting the same code. Use English prose white space conventions where applicable. A little restructuring gives:
use strict; use warnings; my @run; for my $element (@run) { my ($run_cmd, $chdir_cmd) = split ';', $element, 2; ch_dir ($chdir_cmd, $patch, '0'); system ($run_cmd); if ($run_cmd =~ /check.pl/) { next if $? == 2; } elsif ($? == 0) { next; } print "Command Failed: While Executing $run_cmd$!\n"; $err = 1; }
which is of course incomplete and untested.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: looking for suggestion!!!
by Sun751 (Beadle) on Jul 24, 2009 at 09:29 UTC | |
by GrandFather (Saint) on Jul 24, 2009 at 09:35 UTC |