in reply to script working locally, but not on server
We need to see how you're generating the values and keys of the %DECISION hash - most likely, the error is there. I find it very, very hard to believe that hashes would suddenly stop working on the server.