in reply to Best way to read in an XbyX table into a Hash{Key}{Key2}[value] structure

Maybe not better, but a little shorter.
#!/usr/bin/perl use strict; use warnings; chomp(my (undef, @headers) = split /\t/, <>); my %hash; while (<>) { chomp; my ($fromAA, @a1) = split /\t/; @{ $hash{$fromAA} }{@headers} = @a1; }
  • Comment on Re: Best way to read in an XbyX table into a Hash{Key}{Key2}[value] structure
  • Download Code