my %INST= ( PROD => { fullname => "PRODUCTION", dbhost => "proddb", dbsshcon => "", webhost1 => "prodapp", websshcon1 => "", version => "8.1.7", }, DEV => { fullname => "DEVELOPMENT", dbhost => "devdb", dbsshcon => "", webhost => "devapp", websshcon1 => "", version => "8.1.7", }, );
Above I have defined some connection variables (one per server) within the hashes but I need to know if I can define another level of hashes for them. For example (I understand that none of the below will never work as is): DEV => { fullname => "DEVELOPMENT", dbhost => "devdb" => { sshcon => "", }, webhost => "devapp" => { sshcon => "", }, numweb => 1, version => "8.1.7", }, An example of use would be: #variables $server=DEV; $serv_req="devdb"; $serv_type="dbhost"; # $INST{$server}{$serv_type}{$serv_req}{sshcon}=ssh(.....); Is there anyway to do another level of hashes? _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs