Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Multi-Dimensional Arrays and Array References

by hippo (Chancellor)
on Nov 16, 2020 at 18:49 UTC ( #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
Node Status?
node history
Node Type: note [id://11123706]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-01-25 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?