in reply to Re^3: Modification of a read-only value attempted?!?
in thread Modification of a read-only value attempted?!?

*x = \1 also used to be a common way to define "constants".

In the OP's case the aliased $x and 1 should have the same reference.

But there is no point in making temporarily generated values read only, almost all code would break then.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery