yes the TEMP open and data also write to the file.
I am getting the desired result as I required, but my problem is
while running the script the mention error message display in the screen.
You have undefined values in the array @arrValue. Do you want to print something if the array element is undefined or do you want to skip that element?