First off, sorry about the noise -- I expect that Larry will have this
mostly worked out already.  [And, when I re-read Apocalypse 2, I saw
that I had almost literally stolen some of his sentences. *blush*]

On Thu, May 24, 2001 at 10:19:12PM -0400, James Mastros wrote:
> But what about: @foo[(1,2,3)]?
> 
> Are those parens a list-maker, or are they a scalar expression using
> the comma operator.  (Or did we get rid of the comma operator when
> I wasn't paying attention?)  If we do have @foo[(stuff)] make stuff
> be in list context, then that'd be a special case (I think).

It's tempting to say that you need an extra set of parens to make the
comma operator not work.

Then again, there's already a need for two kinds of array index contexts.
If you have 3 dimensional array, and you have a three element array
of indices: are you selecting three sub-arrays, or are you selecting
a single element?  Given that, maybe there's a need for an extra array
indexing context which supports the comma operator.

Then again, it's not very far from there to something like:

sub comma_operator (@args) { return @args[-1]; }

-- 
Raul

Reply via email to