Yup - every time you execute open() the file will be overwritten. You could change your open() mode from ">" to ">>" for appending, but moving the open() and close() outside the loop looks like a more obvious fix.
Well it didnt create any file at all. Also I need it done so that the file name will contain the number 24 and 25 in the title of the files. I also need that store number to be replaced in the file ($store). What would be a better way to do this??? Thanks Jim...