in reply to Re: Syntax for partly associative arrays
in thread Syntax for partly associative arrays
Notice that because $hash is a reference to a hash you access its elements via ->{}. In general if you are going to iterate through an array, you want to use 'foreach's aliasing ability to access the elements of the array directly instead of accessing the elements through their indexes.foreach my $hash (@a) { foreach my $word (keys %$hash) { my $wordvalue = $hash->{$word}; # ... } }
|
|---|