in reply to Line concat to proper hash key

you didnt show us, but somehow you are parsing into the 2 cols before this point, so somehow $column_line comes from column 1 or col 2. You somehow know what col you are in. lets say it is in $coln; so when if ($column_line =~ /:/) is true you save 2 keys $keys{1} and $keys{2} from the parts before the : via $keys{$coln}=$key; then the line becomes $data{$permit_no}{$keys{$coln}} .= $column_line;