in reply to Hash as Hash Value
my %args = (users => %userHash, domains => %domainHash, path => $path)
Perl sees %userHash and %domainHash in list context, and so it expands them into lists. If your code read
my %userHash = (user1 => 'uid'); my %domainHash = (domain1 => 'uri');
your %args assignment would actually say
my %args = (users => 'user1', uid => 'domains', domain1 => 'uri', path => $path);
You need, rather, to use hash refs to maintain the hash structure when you define %args:
my %args = (users => \%userHash, domains => \%domainHash, path => $path);
See perlreftut and/or perllol for information on how to represent nested hash structures (or perldsc or perlref or ...).
|
|---|