Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (22)
As of 2014-07-11 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (232 votes), past polls