in reply to Re: A bizarre way to get a list of filenames
in thread A bizarre way to get a list of filenames

even the parser is sometimes confused

Nitpick: Unlike other cases, such as map or //, I think the rules for when <...> is readline vs glob are pretty clearly spelled out in I/O Operators.

kiz: Note that using glob has several caveats, described in To glob or not to glob. In this particular example that you showed in your post, it's probably fine.

Replies are listed 'Best First'.
Re^3: A bizarre way to get a list of filenames
by LanX (Saint) on Aug 05, 2019 at 15:42 UTC
    > pretty clearly spelled out in I/O Operators

    here I agree with the docs

    These days, it's considered cleaner to call the internal function directly as glob($foo), which is probably the right way to have done it in the first place .)

    I passively remember very hairy edge cases here, and sometimes people try to overload <> for their own iterator use and fail because of edge cases. It's our main iterator operator after all.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      sometimes people try to overload <> for their own iterator use

      You mean like me? But I didn't fail, at least I don't think so ;-)

        > You mean like me?

        nope!

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        update

        maybe "like" you, but I didn't mean "you"!