eduardoll has asked for the wisdom of the Perl Monks concerning the following question:
Then I try to print it:#global hash list example my %hashList = {}; #second global hash my %secondHash = ( car => "NULL", bike => "NULL", cat => "NULL", etc => "NULL", ); #inside procedure "add" $hashList->{$count} = %secondHash;
And I get a bad output: "9/16 => "my %hashtemp = $hashList->{$count}; while ( my ($key, $value) = each(%hashtemp) ) { print "\n$key => $value\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Insert a new key (that is a hash) to a hash
by jettero (Monsignor) on Jun 17, 2009 at 17:55 UTC | |
Re: Insert a new key (that is a hash) to a hash
by Transient (Hermit) on Jun 17, 2009 at 17:58 UTC | |
Re: Insert a new key (that is a hash) to a hash
by kennethk (Abbot) on Jun 17, 2009 at 18:01 UTC | |
Re: Insert a new key (that is a hash) to a hash
by GrandFather (Saint) on Jun 17, 2009 at 22:55 UTC |