Side comment... You may want to run perltidy on your code. Your script may be simple now, but it is already harder than necessary to follow because of the lack of indentation.
Thank you monks for finding time to answer me.. I am following the solution provided by 'BioLion' monk...and changed the hash definition accordingly.. Thanks a lot It really helped..
Namrata