I am fairly well familiar with how a hash and an array work...as well as a hash or arrays or vice-versa. I simply copied a snippet of your response. What I am looking for is a structure that will lend itself well to translation to JSON for display within a web application directory tree:
$VAR1 = { '/tmp/dir1' => { 'innerdir1' => [{'name' => 'file1', 'size' => 12345}, {'name' +=> 'file2', 'size' => 1223}] } };
In reply to Re^4: directory tree to hash of arrays
by mabossert
in thread directory tree to hash of arrays
by mabossert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |