Depending on the context we get either a scalar or an array. Ok so far.
But in the following:
print reverse <STDIN>;
Why do I get a list context? I mean reverse according to doc is either a list or a scalar context. So is print.
Prints a string or a list of strings. Returns true if successful.
So is STDIN
. So why does STDIN
here retrieve lines until EOF and not just collect the first line?