Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Mapping list to hash is dropping list items

by almsdealer (Acolyte)
on Mar 16, 2022 at 16:28 UTC ( #11142142=note: print w/replies, xml ) Need Help??


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?
  • Comment on Re^2: Mapping list to hash is dropping list items

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142142]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-12-01 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?