"What I wanted was similar to what you provided...but instead of each key being the file name, I want to be able to have a series of hashes in an array...such that it would be populated like:"
You've forgotten to post the part that tells us what "it would be populated like"!
If it was supposed to be this (which appears after the next paragraph):
{name => 'pm_multi_line_match.pl', size => 1025}, 'pm_multi_mod_distro_test' => { 'My-Example' => { {name => 'Build.PL', size => 651}, ...etc
then I'm left convinced that you don't really have a clear picture of the data structure you want.
I suggest the first thing you do is follow the link I already gave you ("perldsc - Perl Data Structures Cookbook") and learn about Perl data structures.
When you've done that, tell us exactly, and in full (between <code>...</code> tags), what Perl data structure you'd like to generate from this directory structure (assuming all files have a size of 99):
dir_A +-file_B +-dir_C +-file_D +-dir_E +-file_F +-file_G +-file_H
When we know what your goal is, we can help you to achieve it.
-- Ken
In reply to Re^3: directory tree to hash of arrays
by kcott
in thread directory tree to hash of arrays
by mabossert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |