if ($line1 =~ m/^Start/) { # Append the rest of the record $line1 .= for 1..7; } #### if ($line1 =~ m/^Start/) { # Skip to the end of the record my $t = for 1..6; my $lastline = ; }