while () { chomp; print "$_\n" if / [Bb]ar .* \. java $ /x && !/ ^ fee /x; }