Actually, you're incorrect about the arrayref. Using the \( . . . ) syntax returns a list of references, rather than a reference to an array. In your original code, $rArray will be a reference to a the last scalar in the list, namely 4. The correct syntax for an arrayref is to use square brackets:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.