On Thu, May 05, 2005 at 03:03:22PM -0400, Rob Kinyon wrote:
:     Can I put an operator in a variable and then use it in the []
: reduce meta-operator? Something like:
: $op = '+';
: $x = [$op] @x;

Nope.  That would be parsed as a list of one element, followed by a
syntax error.  You'll have to use the long form with &infix:{$op} for
that sort of run-time indirection.  (Or haul out the big cannon, eval.)


Reply via email to