in reply to File Input and Output
open(file, ">$filename") flock file, 2; print file "Whatever you want to say"; close(file); [download]