in reply to Why do I (sometimes) get a REF ref and not a SCALAR ref?
This ($b) is a scalar ref: my $a; my $b = \$a;; this ($c) is a reference to a reference: my $a; my $b = \$a; my $c = \$b;
A REF(0xxxxxx) is a reference to a reference. Ie. Above $c is the same as my $a; my $c = \\$a;.
More succincly:
my $a; my $b = \$a; print $b; SCALAR(0x3e6c920) my $c = \$b; print $c; REF(0x3e6c8f0) print \\$a;; REF(0x3e6c980)
And:
my $a = 'fred'; my $b = \$a; print $b, ' ', $$b; SCALAR(0x3e6c980) fred my $c = \$b; print $c, ' ', $$c, ' ', $$$c;; REF(0xf5e58) SCALAR(0x3e6c980) fred
|
|---|