I updated my question, can anybody please help
Even when I am, not using the 'exists' function instead when I am using an 'if' loop just match the array element with the key of the %orgin. The two strings are not matching. Even I print this, the array element and the hash key appears to be the same.
I don't understand how to fix this.Please help