XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> I've always wondered why this isn't allowed to work.
because of the ambiguity of literal hashes and blocks, the parser can't tell what you mean between curlies w/o heuristics. For instance from time to time people are very confused why map doesn't work like they thought. That's why Perl6 introduces < > for hashes. You either need to ...
But keep in mind, the if() solution you showed is the most readable for most programmers. > Does anyone have a link to a discussion of why this is? e.g. Re: map problem or Re: map syntax error -- weird
Cheers Rolf ( addicted to the Perl Programming Language) In reply to Re: Looking for discussions of "block after or" syntax error (hash vs block)
by LanX
|
|