in reply to What is this Perlism called...and what does it do?

Ahhh. Thanks all. For some reason my brain just didn't see <foo> inside the parentheses as a filehandle. I kept trying to figure out what the (<...>) operator was. And man, searching Google for "parentheses less-than perl" or "parentheses angle-bracket operator perl" is...not useful. :D

Replies are listed 'Best First'.
Re^2: What is this Perlism called...and what does it do?
by LanX (Saint) on Oct 29, 2021 at 14:24 UTC
    > 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)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) 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).