#filterTwoAndThree.pl use warnings; use strict; if (/two|three/) { print $_; }