in reply to RE: RE: Re: Passing arrays to a CGI
in thread Passing arrays to a CGI
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:
or list-assignment operator:$first = (list_context_expr)[0]; $last = (list_context_expr)[-1];
So, a "list" operator is neither necessary nor sufficient. Parens are not a "list" operator. They're just a syntax helper, usually for precedence.$count = (() = list_context_expr); # also written as: $count= () = list_context_expr;
-- Randal L. Schwartz, Perl hacker
|
|---|