> The former is a literal value appearing in the source code and used as a compile-time constant.
Well a compile-time constant with varying refs? Looks pretty much like just another constructor like [1] to me.
use strict; use warnings; use Data::Dump qw/pp dd/; use constant a => 1; $\="\n"; print \1; # SCALAR(0xdf00e0) print \1; # SCALAR(0xdef540) print \(a); # SCALAR(0x2a19c70) print \(a); # SCALAR(0x2a19c70)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^8: Shouldn't references be readonly? (updated)
by LanX
in thread Shouldn't LITERAL references be readonly? (updated)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |