On Mon, Aug 01, 2005 at 01:13:52PM +0200, "TSa (Thomas Sandlaß)" wrote:
: BTW, you didn't mean originally:
: 
:   say zip (@odd), (@even); # prints 13572468 or 12345678?

That doesn't work, since () in list context does not enforce scalar context.
It's exactly equivalent to

    say zip @odd, @even;

which is also wrong, because zip is requires "multidimentional slice"
syntax.  Ordinary commas will be taken to separate items of the first
slice.  To separate slices requires semicolon or pipes.

: Does &zip now interleave two array refs instead
: of flattened arrays?

No, but separating the arrays with comma doesn't work either, so Pugs
currently has it wrong.  The correct syntax will eventually be:

    zip(@odd; @even)
    zip @odd <== @even

The parens are required only at the top statement level.  Inside other
bracketing structures you can omit the parens:

    (zip @odd; @even)

just as in subscripts the semicolon separates multiple dimensions:

    @[EMAIL PROTECTED]; @b]

Larry

Reply via email to