Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to represent complex data structure and manipulate it easily?

by linuxkid (Sexton)
on Jun 19, 2012 at 20:26 UTC ( #977150=note: print w/replies, xml ) Need Help??


in reply to How to represent complex data structure and manipulate it easily?

I suggest something like this:$structure->[$number]->{$name}

--linuxkid


imrunningoutofideas.co.cc
  • Comment on Re: How to represent complex data structure and manipulate it easily?
  • Download Code

Replies are listed 'Best First'.
Re^2: How to represent complex data structure and manipulate it easily?
by Boldra (Deacon) on Jun 21, 2012 at 07:16 UTC
    Did you know you can omit the second (and subsequent) arrows?
    $structure->[$number]->{$name} can be written $structure->[$number]{$name}.


    - Boldra

      never did realize that, but i dok find it improves readability, especcially when helping grren perl converts...

      --linuxkid


      imrunningoutofideas.co.cc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977150]
help
Chatterbox?
[PriNet]: go figure, i just tried that, it retains some of the values (not the key) of the pre-assigned value
[PriNet]: i guess i'll just have to use two seperate hashes, there are two, but one is larger than the other, and when i reference the smaller one, it holds onto the values that were assigned to the larger hash (the keynames change, but unless i reassign a new valu

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2017-06-28 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.