Perl is best treated like lisp by being lisp-like. Go after the optree directly and both cases look like multiply( EXPR1, EXPR2 ) and repeat( EXPR1, EXPR2 ). I don't know how you thought to solve this where * is overridable but x isn't. Care to share?
In reply to Re^4: interpolating a variable into an operator
by diotalevi
in thread interpolating a variable into an operator
by mlhii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |