if ($switch = 1){ # don't print lines that have previously been repeated print OUT_B "$new_line$old_line"; }