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