in reply to Load table with row/column names

If you can tolerate the change of square brackets to curly braces, it's easy:
#!/usr/bin/perl use warnings; use strict; <DATA>; # Skip the header line my %table; while (<DATA>) { my ($chrom, $pos, $id, $ref, $alt, $qual) = split; $table{$chrom}{$pos} = { REF => $ref, ALT => $alt, QUAL => $qual, }; } print $table{chr1}{1092482}{REF}, "\n"; # Prints T, yay! __DATA__ #CHROM POS ID REF ALT QUAL chr1 1092344 . G T 79.54 chr1 1092367 . C T 148.50 chr1 1092400 . G C 90.54 chr1 1092424 . A G 93.14 chr1 1092461 . G A 105.30 chr1 1092470 . T G 103.06 chr1 1092482 . T C 104.33 chr1 1093235 . G A 16.08 chr1 1093245 . C T 244.75
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ