Ronnie,
I would set it up in a single hash like this:
my ($db, $key);
my %DBs = ( "ISWLIVE" => { "LIVE1" => "/usr/local/bin",
"LIVE2" => "whatever" },
"Next DB" => { "LIVE1" => "/usr/local/bin",
"LIVE2" => "whatever" } );
# etc. for all your DB's and key/values
Then you can iterate through the keys of %DBs like this:
foreach $db ( sort keys %DBs ) {
foreach $key ( sort keys %{ $DBs{$db} } ) {
printf "DB = %s, key = %s, value = %s\n",
$db, $key, $DBs{$db}->{$key};
# do whatever processing you want
}
}