in reply to [closed] map sentence as array slice indexes

I tried to understand why the following (with map sentence) gives an error.

The not-very-helpful answer is: because you've created an ambiguous state in the parser.

It can be avoided by:

My guess is that because the parser fails to find a comma following the first argument ($_) to map, it attempts to treat that first argument as a block, and gets confused.

Under 5.10 I get: panic: ck_grep at ...; but that panic seems to have been replaced with the error message you get in later versions.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.