in reply to Tutorial RFC: Guide to Perl references, Part 1
When converting from 'normal' to 'reference' I propose you keep the same value.
Instead of
my $x = $array[0]; my $y = $aref->1;change the example to
my $x = $array[0]; my $x = $aref->[0];
Otherwise someone who is totally new to references might get the impression you also need to increase the array index by one...
P.S.: Maybe you should also explain the meaning of 'aref' / 'href'.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Tutorial RFC: Guide to Perl references, Part 1
by stevieb (Canon) on Jul 10, 2015 at 13:45 UTC |