in reply to Re: Choosing the right datastructure
in thread Choosing the right datastructure
would give me a hash called %source with each key having a value of the hash "%action", with it's keys and values.my %source; my %action; my ($source, $action) = qw(test_source test_action); $source{$source} = { $action{$action}++ }; $source{$source} = { $action{$action}++ };
$VAR1 = 'test_source';
$VAR2 = {
'1' => undef
};
$VAR1 = 'test_action';
$VAR2 = '2';
$VAR1 = 'test_source';
$VAR2 = {
'test_action' => 2
};
It makes Perl-fect sense, though, that it would set the value of $source{$action} to true, while setting the keys and values of %action_hash.
|
|---|