# now we can derive whichever other hashes or arrays # we might want from the above data. having a list # of column names is always handy: my @COL_NAMES = map $_->{name}, @COL_INFO; # and we might want to look up columns by name: my %COL_BY_NAME; @COL_BY_NAME{ @COL_NAMES } = @COL_INFO; # and to find the index of a column name: my %COL_INDEX; @COL_INDEX{ @COL_NAMES } = 0 .. $#COL_INFO;