The path ahead will be much smoother if you
- use strict;
- Check system calls (like open) for failures
- Don't prime %keyhash with a bogus entry
- chomp(@data = <FILE>); to remove "\n" from the SRIDs (on the assumption that you're going to use them at some point as the script evolves)
- store your SRIDs consistently. (What you're pushing onto %keyhash isn't consistent with how you claim to be laying that structure out.