carcassonne has asked for the wisdom of the Perl Monks concerning the following question:
But how about looping on Porject1's components (Software, Firmware) or the Project1 Software's own sub components (Database, SerialComms) ? Here's the structure (please don't look at it for syntax - it's mostly a representation I've made) :while(($key, $value) = each(%projects)) { print "DEBUG $key = $value\n"; }
Cheers.%projects = ( Projects => { "Project1" => { version => "3.41", status => "nul", components => { "Software" => { name => "controller", label => "RC_1.01", subComponents => { "Database" => { version = "1.01", } "SerialComms" => { version = "2.13", } } "Firmware" => { name => "I/O Interface", label => "RC_1.21", } } } "Project2" => { } "Project3" => { } )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing multi-level hashes
by pg (Canon) on Oct 29, 2005 at 17:01 UTC | |
|
Re: Accessing multi-level hashes
by planetscape (Chancellor) on Oct 30, 2005 at 12:07 UTC |