in reply to Re: hash with a hash
in thread hash with a hash
is the same as$tests{2} = \%blah2;
One thing that you should note is that when explicitly defining hashes and arrays, one can use "()"'s.$tests{2} = { condition => "AND", terms => [ "foo", "bar" ], };
However, anonymous arrays are defined with "[]"'smy @array = ( 1, 2, 3 ); my %hash = ( A => 1, B => 2, C => 3, );
and anonymous hashes are defined with "{}"'s.my $array_ref = [ 1, 2, 3 ]; my @array = @{$array_ref}; # becomes an explicit array
my $hash_ref = { A => 1, B => 2, C => 3, }; my %hash = %{$hash_ref}; # becomes an explicit hash
|
|---|