open(FILE1 , ">" ,"testing1.txt"); print FILE1 "stat"; #Do the required actions print FILE1 "stat-updated"; close(FILE1);