my $result = 1; foreach my $issued_CM_commands (@issued_commands){ my $showconfig; $result = 0 if index("@showconfig", "$issued_CM_commands") == 0 } print "\n--",$result ? 'PASS' : 'FAIL',"\n";