You're definitely missing something.
InfiniteSilence has addressed
your second question one of your questions (
yes, I used to get confused about 'left' and 'right' sometimes, too.
As to the first other, the values you're looking at are -- to all intents and purposes -- pointers to the memory locations (addresses) where the arrays begin. They are NOT, IN ANY SENSE reflective of the values in the arrays themselves.
Update: Demo:
#!/usr/bin/perl
use 5.016;
my @arr1 = qw(a b c d e);
my @arr2 = (3, 5, 7, 9);
my $ref1 = \@arr1;
my $ref1a = \@arr1;
my $ref2 = \@arr2;
say "\$ref1: $ref1 and \$ref1a: $ref1a";
say "\$ref2: $ref2; \@$ref2: @$ref2;" #Second half DEREFs the referen
+ce
=head demo
C:\>1032768-refs.pl
$ref1: ARRAY(0x119ee3c) and $ref1a: ARRAY(0x119ee3c)
$ref2: ARRAY(0x119f12c); @ARRAY(0x119f12c): 3 5 7 9;
See the tuts here at References.
If you didn't program your executable by toggling in binary, it wasn't really programming!
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.