my $cmd="cat $logName"; @content = $self->{conn}->cmd($cmd); unless ( @content = $self->{conn}->cmd($cmd)){ $logger->error(__PACKAGE__ . ".$sub_name: Failed to execute the shell command:$cmd "); $logger->debug(__PACKAGE__ . ".$sub_name: <-- Leaving Sub [0]"); return 0; for my $i ( 0 .. $#{$parseLogData{$_}}) { my $parseString = $parseLogData{$_}[$i]; my $flag = 0; if (@line = grep{/\Q$parseString\E/i} @content) { $logger->debug(__PACKAGE__ . ".$sub_name: PARSE SUCCESS: Expected -> \"$parseString\" in \"$logName\": Count of Matches -> $#line"); $flag = 1; } else { $logger->debug(__PACKAGE__ . ".$sub_name: PARSE FAILED: Expected :: -> \"$parseString\" in \"$logName\" "); } }