open (FILE,$file); # $file is a |-delimited file my @header = ('h1','h2','h3'); # I already know the headings my %values; # make a hash of hashes to remember the values while (<FILE>) { chomp; my @columns = split /\|/; my $unique = $columns[1]; # h2 is the unique identifier @values{$unique}{@header} = @values; }
In reply to Slice of a hash of hashes by davemabe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |