Help for this page
#use a flag to indicate a match ... $found ? print "\n Test -- found pattern -- \n" : print "\n Test -- did not find pattern -- \n";
foreach (@commands_run) { if($_ =~m/clock/) { ... last; # we have a match, exit loop } }