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
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
In the absence of evidence, opinion is indistinguishable from prejudice.
Not understood.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.