in reply to searching through array for multiple patterns

Why not just keep it simple:
print qq/found\n/ if grep /clock/, @commands_run;
A user level that continues to overstate my experience :-))