in reply to Hash Table References?
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
|
|---|