> As this doc excerpt (from "map" on "perlfunc") says it should:
> 
>                "{" starts both hash references and blocks, so "map { ..."
>                could be either the start of map BLOCK LIST or map EXPR, LIST.
>                Because perl doesn't look ahead for the closing "}" it has to
>                take a guess at which its dealing with based what it finds just
>                after the "{". Usually it gets it right, but if it doesn't it
>                won't realize something is wrong until it gets to the "}" and
>                encounters the missing (or unexpected)
>                comma. [...]

Thanks, Bob.

IMHO, the missing comma should allow the parser to back-track
and make the right decision on expr-versus-block.



> <rant> Personally, I find this sort of "magic syntax" crap really
> annoying. ...

Amen to that!

> ... Being an old Lisp hacker, I would have preferred that map
> always take a functional; then there's no syntax guesswork.  But, being
> an old Lisp hacker, I also realize that I'm just a lone voice crying in
> the wilderness . . . </rant>

Not exactly "lone", because I am there howling with you.  :-)

peace,          || Byatrayanapura: Better governance thru online taxes:
--{kr.pA}       || http://tinyurl.com/296js
-- 
"If I have not seen farther, it is because giants have stood on my shoulders."
    -- V. Guhan.  [with apologies to Newton, Sir Isaac.]
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to