Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Are there cases where something that's unambiguously a list (and not an array) returns anything else than the last item? A regular expression match with the /g flag, in scalar context. A map or grep expression in scalar context. The empty list my $x = () = some_expression; construct, in scalar context. A bare hash. (Want to argue over what a list is? Is it multiple, comma-separated expressions or something that pushes one or more items onto the internal stack? I'm not sure lists even exist as a language-level construct in Perl 5.) In reply to Re^3: If you believe in Lists in Scalar Context, Clap your Hands
by chromatic
|
|