> didn't see <foo> inside the parentheses as a filehandle
In this case it's not a readline filehandle but a glob pattern like choroba already explained.
The DWIM rules to distinguish between glob and readline are more complex tho °, but it's mostly evident by context.
> And man, searching Google for "parentheses less-than perl" or ...
try Perl Diamond Operator.
As a rule of thumb, if you need to look up a Perl operator, search perlop (sic)
°) from perlop#I/O-Operators
> That means <$x> is always a readline() from an indirect handle, but <$hash{key}> is always a glob(). That's because $x is a simple scalar variable, but $hash{key} is not--it's a hash element. Even <$x > (note the extra space) is treated as glob("$x "), not readline($x).
|