in reply to Re: Iterate over a perl nested hash data structure
in thread Iterate over a perl nested hash data structure

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Iterate over a perl nested hash data structure
by NewLondonPerl1 (Acolyte) on Feb 20, 2013 at 06:28 UTC

    Sorry I am trying to paste in what data::dumper prints out to show you what this hash of hashes looks like but when I use the code tags / its just not displaying correctly

      From this:

      $VAR2 = { 'dev' => [ { 'nfsmount' => { 'bigstor_nfs' => { 'bigstor17_mpt' => { 'filer_device' => { 'ny_loc' => 'nnap5307-s', 'nj_loc' => 'nydevnfs_bigstor_volC' }, 'filer_volume' => { 'ny_loc' => '/vol/bigstor_volC/bigstor +17', 'nj_loc' => '/vol/bigstor_volC/bigstor +17' }, ... More here ...

      To access 'nydevnfs_bigstor_volC' you would do:

      $VAR2->{dev}[0]{nfsmoun}{bigstor_nfs}{bigstor17_mpt}{filer_device}{nj_ +loc}

      You can use the iteration logic provided below along with this to reach any element you need.

      HTH

      That's because you omitted the closing code tag, </code>. Pls fix.