if (@txtfile[$i] =~ /\b- skipped/) { chomp ($errout = @txtfile[$i]); push(@outfile,$errout); }