use strict; use warnings; open (NEW, ">", "output.txt" ) or die "could not open:$!"; open (FILE, "<", "Report.txt") or die "could not open:$!"; while () { print NEW if /^\h{3}\d/; } close (FILE); close (NEW);