Inside a ternary ?: the expressions are evaluated - and \& { } constructs a code ref block which gets evaluated at runtime, to get at the name of the symbol table entry CODE slot from which a reference is taken.
This literally answers my question, and indeed I had realized myself after posting. Anyway I would consider this the "most side-effectish hack abuse one may have imagined for such a thing". This is certainly silly: one thing either has side effects or not, but... well to mangle the sybol table just to execute a block is... err... well... just as bad™ as I can imagine!
In reply to Re^5: Mr. Ternary is greater than Mrs. If Else
by blazar
in thread Mr. Ternary is greater than Mrs. If Else
by PerlPhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |