Perl Programming/Keywords/readline

The readline keyword
readline is a function that reads from the filehandle whose typeglob is contained in EXPRESSION. Without a parametre, it reads from *ARGV. If called in scalar context, it reads the file line-by-line until end-of-file is reached. After this, the function returns undef. If called in list context, it reads till end-of-file and returns a list of lines. (The definition of a line is given by $/ or $INPUT_RECORD_SEPARATOR).