in reply to Perl hash keys not considered unique

You are assuming that $files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'} and $files{'ENV.FILESOURCE.SOURCE.J2018058.N000001'} point to unique hashs. but what if there was somewhere above this section a line that said:

$files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'}=$files{'ENV.FILESOURC +E.SOURCE.J2018058.N000001'};
while there would be an entry in $files for both names, they would both point to the same hash, so modifying either $files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'}{data} or $files{'ENV.FILESOURCE.SOURCE.J2018058.N000001'}{data} would mean that the same end data location has been modified.