Without seeing your actual input, I can only guess: maybe the documents are repeated in carson_county_abstracts.txt as well?
You might need
Data::Dumper to
print Dumper \%docs to see what's really inside the hash (check for whitespace in keys and similar). Also, change line 33 to
print "<$1:$docs{$1}>\n";
to see whether you are matching the right thing.