Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Another thing I haven't seen mentioned yet: When dealing with nested constructs like this, I find it useful to dereference each level into a temp variable, rather than sling around nested refs. Makes the code easier to read, brings your assumptions about the data's structure to the front, and prevents problems like this, but at a cost in speed and space. I think it's usually a good tradeoff. So you'd have:
instead of Hofmator's
It doesn't make a big difference here, but with deeply nested structures it's invaluable. -- In reply to Re: Finding the size of an array in a hash?
by FoxtrotUniform
|
|