in reply to Re^3: Different behaviors between "while" and "map"
in thread Different behaviors between "while" and "map"

Not for the last 12 years or so. It's expanded to
while (defined ($_ = <SOME_FILE_HANDLE>)) { ... }

Replies are listed 'Best First'.
Re^5: Different behaviors between "while" and "map"
by ikegami (Patriarch) on Dec 06, 2008 at 06:09 UTC

    Technically, you're both right, because

    while ($_ = <SOME_FILE_HANDLE>){ ... }
    is expanded to
    while (defined ($_ = <SOME_FILE_HANDLE>)) { ... }

    But all this is irrelevant. It's not the magical expansion of <> that causes the scalar context.