in reply to Hash Table References?

You can construct a reference to a hash of hashes all in one go. The variable $rhEnvInfo below will hold a reference to the hash keyed by environment name and whose values are references to further hash tables containing information for each environment. Values for a particular environment can be accessed by de-refencing with the -> operator. Like this

use strict; use warnings; my $rhEnvInfo = { LIVE => {ADMIN_DIR => q{/opt/bin1}}, DEVLP => {ADMIN_DIR => q{/opt/bin2}}, TEST => {ADMIN_DIR => q{/opt/bin3}} }; my $try = q{DEVLP}; print qq{ADMIN_DIR for $try is }, qq{$rhEnvInfo->{$try}->{ADMIN_DIR}\n};

When run this prints

ADMIN_DIR for DEVLP is /opt/bin2

I hope this helps.

Cheers,

JohnGG