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

my (undef, @col) = split /\s+/, <DATA>; # Column names
When splitting on \s+ instead of \t, the first header value, 'Amino Acid Switch Probabiities', will be wrongly split into the @col array. You need to split on tabs to prevent this from happening.

Replies are listed 'Best First'.
Re^3: Best way to read in an XbyX table into a Hash{Key}{Key2}[value] structure
by rjt (Curate) on Aug 07, 2013 at 22:09 UTC

    Quite right. My local test copy of the sample data was based on the original OP (which had the tabs squashed to spaces), and I forgot to update my split pattern when posting. Corrected now, thanks.