Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 lurking in the Monastery: (9)
As of 2014-09-21 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (167 votes), past polls