Perl provides several syntaxes for dereferencing (
Using References). In general, you are free to use whichever one you feel is easiest to use. Method 2 has the advantage that it always works (no exceptions or special cases). Unfortunately, the resulting code can be nearly impossible for people to read. Your choice of the arrow operator is probably the most common. See link above for details.