use strict; use warnings; set LINES=40; set COLUMNS=80; open(my $in , "<" , "UR59_rev162_1KLoops_LastRun_SITEC1.txt") or die "can't open input.txt $!"; open(my $out , ">" , "UR59_rev162_1KLoops_LastRun_SITEC1_deleted.txt") or die "can't open out.txt $!"; while(<$in>) { if( $_ != /^\s/) { print $out $_; } }