Monday, May 11, 2009

Appending to a File

The secret to this is just to open the file with >> prefixed to the filename.
$logfile="appendtext.lo";
open(DAT,">>$logfile") || die("Cannot Open File $logfile: $!");

print DAT "\nfarq=foo";

No comments:

Labels

Blog Archive

Contributors