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.
Previous slide
Next slide
Back to first slide
View graphic version