Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Using 'keys' on a list

by Anonymous Monk
on Jun 30, 2021 at 12:02 UTC ( [id://11134484]=note: print w/replies, xml ) Need Help??


in reply to Re: Using 'keys' on a list
in thread Using 'keys' on a list

so keys just can't work on 'a' (in your example)...

no, list in scalar context returns the last value

Replies are listed 'Best First'.
Re^3: Using 'keys' on a list (update x2)
by LanX (Saint) on Jun 30, 2021 at 12:32 UTC
      That's wrong.

      got an example of a "list in scalar context" or "comma operator in scalar context" or whatever that returns something other than the last value? wantarray is cheating

         sub f { %hash }
        - Ron
Re^3: Using 'keys' on a list
by The Perlman (Scribe) on Jun 30, 2021 at 13:21 UTC
    A "list in scalar context" doesn't exist.
    - Ron
      that doesn't make what glycine wrote any less wrong
        I didn't reply to glycine.
        - Ron

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found