my $te = HTML::TableExtract->new( headers => [(@column_names)], keep_headers => 1 ); $te->parse_file($inFilename_long); foreach my $ts ($te->tables) { print "\nLine 0 ", join(', ',$ts->row(0)); print " <--- Header row"; print "\nLine 1 ", join(', ',$ts->row(1)); print "\nLine 2 ", join(', ',$ts->row(2)); print "\nLine 3 ", join(', ',$ts->row(3)); print " <-- This has merged cells with the line above it and correctly pushes to the right."; print "\nLine 4 ", join(', ',$ts->row(4)); print " <--- Why are these column values being pushed to the right? Also data is lost."; print "\n"; }