in reply to Extraction of set of lines using regular expression

The g flag is unnecessary, since you only need to match once. You also don't need two expressions, since you can combine them into one, and if the value is in $_, you don't have to specify it in the expression. The following does essentially the same thing:
while (<DATA>) { push @errors, $_ if m/^E|gmake/i; } print @errors; __DATA__ E : abcdfcsds 1387382 43243 ijigje jg445 3u4 (53545545) E : abcdfcsds 1387382 43243 ijigje jg445 3u4 (53545545) E : abcdfcsds 1387382 43243 ijigje jg445 3u4 (53545545) E : abcdfcsds 1387382 43243 ijigje jg445 3u4 (53545545) E : abcdfcsds 1387382 43243 ijigje jg445 3u4 (53545545) gmake : **** build failed fdjgu43uffer Error 1
Or if you want it to match only when gmake is at the start as well, and just made a typing error:
push @errors, $_ if m/^(?:E|gmake)/i;