Hi All.
Mikhael Goikhman wrote:
>> I want to clarify that the call is suppose to do what the last statment
>> does: when MetaField runs the sub, it will return the value inside
>> $_->ctx->{length}. (and not that $_->ctx->{length} will contain the sub ref)
>>
>> The propose of this is to make it niffy. I need to make some info
>> available to the function, so I thought to load it on an object, local
>> $_ to it, and run the function.
>>
>> So why map/grep can work without sub{}, and I can't?
>
> It was mentioned already that the magic only occurs on the first CODE
> argument (&...) and not on the following ones. The rational for this is
> simple, to allow such compact syntax, but make the balance between what
> is allowed and being ambiguous.
It was? I must have missed that in all the "interesting discussion" that
took place.
> apply { "meaning of life" } on { 21 * 2 };
This is a cute idea. Don't think that it's applicatable in my program,
but I'll keep that in mind.
Thanks for the detailed explanation.
Shmuel.
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl