in reply to Parsing lines containing extra carriage returns
my $number_of_fields = 10; my $hold = ""; while(<FILE>) { chomp; my $line = $hold.$_; my @line = split("\t", $line); if (@line < $number_of_fields) { $hold = $line; next; } $hold = ""; do stuff }
Update:
Forgot to mention that you need to know the # of fields
that you are expected to have. And error checking would
be desired.
|
|---|