IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New How large is large?
Personally I tend to use Data::Dumper. (I prefer setting $Data::Dumper::Indent to 1.) Admittedly that is slow and memory wasteful for data structures with tens of thousands of elements.

Some people prefer the output of YAML. I haven't used it though.

Either will dump a hash of arrays in a readable format, and won't break if your data structure isn't quite as regular as you thought.

Beyond that, if you are going to write your own code for dumping a hash of arrays, I would strongly recommend indenting the array elements some and outdenting the hash keys so that visual scan can tell you where you are in the data structure.

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Re: How large is large?
While each array might only have a few (<100) elements, there might be lots of arrays (thousands). I'll look at Data::Dumper.


Peter
[link|http://www.debian.org|Shill For Hire]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Blog]
     Printing out hashes of arrays - best practice? - (pwhysall) - (2)
         How large is large? - (ben_tilly) - (1)
             Re: How large is large? - (pwhysall)

Did I already say great googly moogly?
57 ms