It's good to see you using use strict;. However you only need it once in your script (although may be this is a couple of scripts combined to show the issue, in which case good work and ignore the comment).
I recommend that you return as soon as you find and deal with an error so you don't clutter the following code with redundant tests:
if ($paramno == 0) { print "\n\tNo parameters supplied - can't set up environment!\n" + ; return 0; }
However the real problem seems to be that you are creating an array containing a single element which is a reference to a hash in your lookup hash, where I suspect you really just want a reference thus:
my %DBhashlookup = ( "TEST" => \%TEST, "LIVE" => \%LIVE, "DEVLP" => \%DEVLP, ) ;
Making that change and running the code prints:
xxrctest S T A R T S KEY :: ADMIN_DIR VALUE :: /opt/bin2 xxrctest E N D S
In reply to Re: Hash Table References?
by GrandFather
in thread Hash Table References?
by Ronnie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |