in reply to Re: chained hash slices?
in thread chained hash slices?

None of the following exist, so the result should be a list with 6 undef.

Replies are listed 'Best First'.
Re^3: chained hash slices?
by moritz (Cardinal) on Jun 03, 2008 at 06:52 UTC
    So it seems the OP wants chained slice-dereferencing braces to calculate a cross product. That would be very unlike anything perl does at the moment.

    I don't see how @hash{@list}{@list} could work without being horribly magical, inconsistent and counter-intuitive. @hash{@list} returns a list of hash references, not a hash.

    If you want to change that, you'd have to invent a syntax like %hash{@list}, which merges all the hash refs into a single hash, which can be sliced in turn.

    And then you'd have to find a good way to deal with duplicates in the new hash.