![]() |
|
Think about Loose Coupling | |
PerlMonks |
•Re: Mysterious "syntax error"by merlyn (Sage) |
on Nov 30, 2004 at 15:52 UTC ( #411217=note: print w/replies, xml ) | Need Help?? |
Because map can take either a block or an expression, and open curly can start a block or an expression (start of an anonymous hash), there's some "guessing" code to deal with the ambiguity, and sometimes it guesses wrong.
You can disambiguate these with: This is documented in perldata I believe. Or perlref. -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|