in reply to Problem with deleting a hash key

Part I
The while loop looks better like this:
open (INFILE, "input_file.csv") || die "Cannot open file!"; <INFILE>; while (<INFILE>) { $ix++; $sec = [ split(/\;/, $_) ]; next unless (scalar(@$sec)) if (length($sec->[9]) > 12) { $memid = lc(substr $sec->[9], 4, 8); } else { $memid = $sec->[9] eq '' ? 'FORCEMEMID' : $sec->[9]; } $list{$memid}{$ix} = $sec; }

If $memid don't have the data in the last index of @$sec you don't need the chomp and the chop.
Where is declared %dbsrv?
End of Part I