I was going through a snippet of code and I didn't understand the following notation (line 5 in the code below]. I am confused as how can a hash be represented as an array or is it a different form of hash of arrays or is array of hashes. The code is as follows:
my @Data; my @cols = qw(col1 col2 col3 col4); while (<STDIN>) { chomp; my %table; @table{@cols} = split /\t/; ## Explain push @Data, \%table; }
In reply to Data Structure: HOA or AOH ?? by snape
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |