in reply to Re^2: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands
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.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: If you believe in Lists in Scalar Context, Clap your Hands
by moritz (Cardinal) on Oct 24, 2008 at 15:28 UTC | |
by chromatic (Archbishop) on Oct 24, 2008 at 17:31 UTC | |
Re^4: If you believe in Lists in Scalar Context, Clap your Hands
by jwkrahn (Abbot) on Oct 25, 2008 at 02:15 UTC | |
by chromatic (Archbishop) on Oct 25, 2008 at 10:21 UTC | |
by jwkrahn (Abbot) on Oct 25, 2008 at 14:35 UTC | |
by chromatic (Archbishop) on Oct 25, 2008 at 18:41 UTC | |
by massa (Hermit) on Oct 25, 2008 at 02:59 UTC |
In Section
Meditations