Since updating to Tex Live 2021 (from 2019), there are two additional (unwanted) vertical bars in a tabular after the last row. This was not happening in the 2019 version.
What am I doing wrong?
Here is the MWE
\documentclass[a4paper, 12pt]{article}
\usepackage{float}
\begin{filecontents}{\jobname.txt}
&title1&title2&title3&title4 \\\hline
\end{filecontents}
\begin{document}
\begin {table}[H]
\scriptsize
\begin{center}
\begin{tabular}{| p{4.5cm} |p{2cm} |p{2cm} |p{2cm} |p{2cm}| }
\hline
\input{\jobname.txt}
\end{tabular}
\end{center}
\end {table}
\end{document}
Version of pdflatex:
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03

\inputis expandabe, but LaTeX makes things more complicated. All the more reason not to use LaTeX. – wipet Jul 19 '23 at 06:02