|
|
| Do you know where your variables are? | |
| PerlMonks |
Re^3: If you believe in Lists in Scalar Context, Clap your Handsby chromatic (Archbishop) |
| on Oct 24, 2008 at 08:27 UTC ( #719276=note: 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 Section
Meditations
|
|
||||||||||||||||||||||||||||||||||