Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Multi-Dimensional Arrays and Array References

by hippo (Bishop)
on Nov 16, 2020 at 18:49 UTC ( [id://11123706]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Multi-Dimensional Arrays and Array References
in thread Multi-Dimensional Arrays and Array References

When should I store my data in a reference ... versus an array

In general consider using a reference when you plan to do 1 or more of these:

  • Passing your array to/from subroutines
  • Combining your array into a larger structure (see perldsc)
  • Using it as an object (unlikely, but not unheard of)
  • Having multiple references to the same data (obviously)

See also the References tutorials subsection for other good info.


🦛

  • Comment on Re^3: Multi-Dimensional Arrays and Array References

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11123706]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-16 19:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found