filmo has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (directories)
If the top directory is "home" and one of the subdirectories is 'user1', I would like be able to access the files as%result = ('top' =>[ file1, file2, file3, subdir1 => [sub_file1, sub_file2], subdir2 => [sub_file3, sub_subDIR =>[sub_sub_file1]], etc... ]);
$result{'home'}[0] $result{'home'}{'user1'}[0] $result{'home'}{'user1'}[1], etc
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I get directory structure into a hash?⭐
by Aristotle (Chancellor) on Dec 15, 2002 at 01:16 UTC | |
|
Re: How do I get directory structure into a hash?⭐
by BrowserUk (Patriarch) on Dec 15, 2002 at 07:58 UTC | |
|
Re: How do I get directory structure into a hash?⭐
by merlyn (Sage) on Dec 15, 2002 at 00:17 UTC | |
|
Re: How do I get directory structure into a hash?
by filmo (Scribe) on Dec 15, 2002 at 01:01 UTC | |
|
Re: How do I get directory structure into a hash?
by BrowserUk (Patriarch) on Dec 15, 2002 at 07:57 UTC | |
|
Re: How do I get directory structure into a hash?
by anandsridharan (Initiate) on Nov 29, 2011 at 04:06 UTC | |
|
Re: How do I get directory structure into a hash?
by anandsridharan (Initiate) on Nov 29, 2011 at 04:17 UTC |