in reply to Re^7: Shouldn't references be readonly? (updated)
in thread Shouldn't LITERAL references be readonly? (updated)
(you forgot to put [1] into code-tags)
> 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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^9: Shouldn't references be readonly? (updated)
by dave_the_m (Monsignor) on Aug 06, 2020 at 08:51 UTC | |
by LanX (Saint) on Aug 06, 2020 at 12:26 UTC | |
Re^9: Shouldn't references be readonly? (updated)
by chromatic (Archbishop) on Aug 06, 2020 at 00:41 UTC | |
by LanX (Saint) on Aug 06, 2020 at 01:35 UTC | |
by chromatic (Archbishop) on Aug 06, 2020 at 05:26 UTC | |
by LanX (Saint) on Aug 06, 2020 at 11:57 UTC |
In Section
Seekers of Perl Wisdom