in reply to Re: Mapping list to hash is dropping list items
in thread Mapping list to hash is dropping list items

If I understand correctly, <> will read from @ARGV unless it is empty in which case it will read from STDIN?

Also, why did you wrap everything between my @alTags and print in a block?

Replies are listed 'Best First'.
Re^3: Mapping list to hash is dropping list items
by Fletch (Bishop) on Mar 16, 2022 at 17:14 UTC

    When used like this the diamond operator is actually glob which generates a list of filenames; those filenames are used to populate @ARGV and (yes) then the plain <> readline version will implicitly read from those files. The block was (my guess) probably intended to scope the local change to @ARGV to just that section of code.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.