in reply to Re^2: How to get variable name in trace message
in thread How to get variable name in trace message

There is no variable name associated with the expression, so undef could work, and it is ok to assign to undef.

Quoting the expression might also be a nice option if possible.

$foo = 1; undef = 'StringResultOfExpression'; $str . result('expression') = 'StringResultOfExpression'; @bar = [ 1, 2, 3, ];