in reply to Re^2: Appending and empty filesin thread Appending and empty files
You don't need system to clobber temp, open my($fh), '>', 'temp' will clobber temp, which means your problem is your program logic and/or input data
Meaning, the open statement (after the first one) which is supposed to clobber temp is never executed