Then you make a reference to it using "\" called $array_reference.
Then you pass that reference to a subroutine print_array().
The subroutine dereferences the array (@$reference) and loops over the items in the array, printing them out.
Then you dereference the 4th item (starts at 0) with $$array_reference[3]. (you can also use $array_reference->[3] which I think looks nicer).
In reply to Re: References Explanation
by ctilmes
in thread References Explanation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |