Not sure either. I mostly coded this without thinking it through, with several iterations of corrections. So the hash is just something I had at one point and didn't think to replace. Since I like working with closures I'd definitely use a closed-over lexical if I ever needed to use that in actual code.
The fact that you can code something that looks like another language entirely but still is valid perl says a lot about the flexibility of the language :).
Edit: but it wouldn't work for everything though. If X in @list; works fine, (X + Y) in @list; would fail as (X + Y) is not a subroutine call.
In reply to Re^4: Create a new operator, get LHS (indirect method)
by Eily
in thread Create a new operator, get LHS
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |