CSE 341 -- S. Tanimoto                                                    Perl Arrays, Functions, Lists, Refs, Etc
8
List Context vs Scalar Context
Any Perl function or operator can have behavior that depends on the "context" in which it is called.
# Scalar context:
$line = <INFILE>;  # reads one line.
# List context:
@lines = <INFILE>; # reads all lines.