It apparently doesn't work because the string "5=8(" is not in any of the lines.
In reply to Re^3: Perl:how to find multiple strings by jwkrahn in thread Perl:how to find multiple strings by auto_w