Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: How to create loop in perl dynamically

by djerius (Beadle)
on Sep 26, 2012 at 20:01 UTC ( #995864=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to create loop in perl dynamically
in thread How to create loop in perl dynamically

I think you're using the wrong data structure for your data; use hashes, not arrays.

Read your data in, split it into fields, then construct nested data structures to hold your data. The Perl Data Structures Cookbook (perldsc) has all of the information you need.

You can then either directly extract the information at the requested level or use Data::Path or Data::DPath.

  • Comment on Re^5: How to create loop in perl dynamically

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995864]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2017-01-24 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.