readline function - read one line
You can use the readline function to read a single line.
readline file handle
The readline function has exactly the same functionality as the line input operator. In Perl, it's customary to use line input operators, so it's better to use line input operators.
Please refer to the following article for the line input operator.