in reply to Re: Better Way to Combine Two Arrays
in thread Better Way to Combine Two Arrays

That's how I'd write it too...

However, I'd like to point out that map actually is a function, so you can use parentheses in the way tha is common for any other function:

@nums = ( map(q|1234560| . $_, 1..9 ), map(q|1321343| . $_, 10..99) );

Replies are listed 'Best First'.
Re^3: Better Way to Combine Two Arrays
by chip (Curate) on Mar 11, 2004 at 14:04 UTC
    But I'm not fond of the map EXPR syntax. A block of executable code should look like a block of executable code, and be different from the always-evaluated input list. Or so it seems to me.

    Unfortunately I recently found out that map BLOCK is actually a bit slower than map EXPR. I might fix that one of these days.

        -- Chip Salzenberg, Free-Floating Agent of Chaos

      But I'm not fond of the map EXPR syntax. A block of executable code should look like a block of executable code
      Huh... me too, actually.
      Unfortunately I recently found out that map BLOCK is actually a bit slower than map EXPR.
      Entering and exiting an extra scope?

      Perhaps you could optimize it by skipping the scoping steps in case there are no lexical variables declared in it.