in reply to Re: Do not run code even if one element has matched exit code value
in thread Do not run code even if one element has matched exit code value
my @retCodes_values; open my $read_log_file, '<', '/tmp/app.log' or die $!; while(<$read_log_file>){ next unless /retCode\=/; my ($string, $exit_code) = split /retCode\=/,$_,2; push @retCodes_values, [ $string, $exit_code ]; } foreach(@retCodes_values) { if ($_!=~3) { read 2nd log file; read 3rd log file; } }
____app.log______
15288 :: Mon Mar 2 13:23:32 2015::App.pm:status returned with retCode=115288 :: Mon Mar 2 13:24:32 2015::App.pm:status returned with retCode=3
15288 :: Mon Mar 2 13:25:32 2015::App.pm:status returned with retCode=415288 :: Mon Mar 2 13:23:32 2015::App.pm:status returned with retCode=5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Do not run code even if one element has matched exit code value
by toolic (Bishop) on Mar 12, 2015 at 15:43 UTC | |
by jayu_rao (Sexton) on Mar 12, 2015 at 16:02 UTC | |
by AppleFritter (Vicar) on Mar 12, 2015 at 21:25 UTC | |
by jayu_rao (Sexton) on Mar 14, 2015 at 13:48 UTC | |
|
Re^3: Do not run code even if one element has matched exit code value
by marinersk (Priest) on Mar 12, 2015 at 15:47 UTC |