Many "mystery issues" of my own have been caused by typos in variable names. You might want to read the code
very carefully and scan for that. Also, if you're using
use warnings, you may see some "used only once" warnings for variables with typos in their names. Unfortunately, this doesn't hold true for normal hash keys.
---
It's all fine and dandy until someone has to look at the code.