gowtham, you forgot to add your code.
Add a reply to your original question, by clicking on the
"Comment on slow running of perl scripts.." link,
and then paste your code into the text box, and make sure you put it between <code></code> tags so that is displays properly.