Thread: LOG File...
Results 1 to 2 of 2
Include an HTML File into an another html file. Forum: HTML ForumReplies: 1
PHP for automatically generating file/link list with file titles Forum: PHP ForumReplies: 1
zipping up a file Forum: HTML ForumReplies: 2
ATN File Forum: Graphics ForumReplies: 3
06-29-2006, 05:52 AM #1
07-08-2006, 11:57 AM #2
Re: LOG File...
You open the log file, you print to the open logfile, you close it:
open F, ">myLog.log" or die "can not open logfile $!\n";
print F "Error xxx occured\n";
F is the file handle, you can use with print. The > says you open it for output (writing to the file).
You can print whatever is necessary for you, e.g. a constant message, as in my example, the content of a variable, the return value of a system call (to the command line) etc. That's up to you. \n is simply a new line (carriage return).
Hope this helps. Good luck.
Kind regards, Michael