Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
[james28909]: id just rename the subrouties perl what kind of data they are getting. something easy to remember too. like if get_data were returning movies titles, rename get_data to movies or movie_titles or get_movie_titles.
[james28909]: s/perl/per/
[james28909]: but i dont really know what your end goal is. if it works dont fix it lol

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2017-05-24 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?