in reply to Re: map()'s BLOCK and deviations from othogonality...
in thread map()'s BLOCK and deviations from othogonality...
You are in map()'s EXPR form and so are not seeing the real problem.Hmmm, I see that this does work. So basically you're saying that if don't put that disambiguator there, perl thinks it's the EXPR form of map() rather than the BLOCK form, notwithstandig the fact that there's no comma after the block itself. I think this is so because it begins to interpret the "no" as a hash(ref)'s key, right?Disambiguate your expression:
my %hash=map { ; # Disambiguator
All in all one the lesson we learn could be that "while nothing but perl can parse Perl, even perl sometimes has difficulties doing so"...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: map()'s BLOCK and deviations from othogonality...
by merlyn (Sage) on Feb 24, 2005 at 16:37 UTC | |
by blazar (Canon) on Feb 25, 2005 at 09:37 UTC | |
|
Re^3: map()'s BLOCK and deviations from othogonality... (comma)
by tye (Sage) on Feb 24, 2005 at 18:38 UTC | |
by rir (Vicar) on Feb 24, 2005 at 20:24 UTC |