while (<>) { if ($_ =~ /\^E/gi || $_ =~ /gmake.*/gi) { push (@errors, $_) } }