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
In reply to Re^2: Do not run code even if one element has matched exit code value
by jayu_rao
in thread Do not run code even if one element has matched exit code value
by jayu_rao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |