in reply to RE: RE: Re: Passing arrays to a CGI
in thread Passing arrays to a CGI

There was a long thread about this on perl6-language the other day. There's no need for a "list" operator (opposing the "scalar" operator) because everything that can make use of list context already provides list context automatically.

And there are no consistent ways to "downcast" a list to a scalar, so you'd have to be explicit about what you wanted: first element, last element, count, and so on. And all of those are already available, either in the form of a literal slice:

$first = (list_context_expr)[0]; $last = (list_context_expr)[-1];
or list-assignment operator:
$count = (() = list_context_expr); # also written as: $count= () = list_context_expr;
So, a "list" operator is neither necessary nor sufficient. Parens are not a "list" operator. They're just a syntax helper, usually for precedence.

-- Randal L. Schwartz, Perl hacker