Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by almsdealer (Acolyte)
on Mar 16, 2022 at 16:28 UTC ( [id://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?

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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (None)
    As of 2025-01-18 07:11 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Which URL do you most often use to access this site?












      Results (56 votes). Check out past polls.