I would like the following code to be a fatal error. How do I do this?
$ref = \ $var; "$ref"
$ref = \ $var; print $ref;
theorbtwo had a suggestion but it only covers stringifying blessed references.
package UNIVERSAL; use overload q("") => sub { die "Attempt to stringify reference" };
In reply to How to prevent references from stringifying? by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |