in reply to Re: syntax of map operator
in thread syntax of map operator

Intuitively, I feel that the block must add a wider scope than the expression: for the latter, the scope effect is limited to affect just $_, for the block, you can add lexical variables of your own.

Put it this way: the expression can use a "lite" scope.

caveat: I have no idea if this is actually the case!

Replies are listed 'Best First'.
Re^3: syntax of map operator
by ikegami (Patriarch) on Jan 24, 2010 at 18:54 UTC

    Intuitively, I feel that the block must add a wider scope than the expression

    I think you mean narrower (i.e more restrictive) scope. Lexicals declared in the block are not visible outside of the map. Lexicals declared in the expression are visible outside of the map

    I agree. That narrower scope is the compile-time scope I mentioned earlier. map BLOCK has one. map EXPR, doesn't (unless EXPR includes a do{} or something).