$search_for = 'Failed|Ugly|Broken'; while () { print if /$search_for/; ...