my %data; open(A, '<', 'fileA'); while () { chomp; my @cells = split(' ', $_); $data{lc($cells[0])} = [ @cells ]; } close(A);