hi,
I have a script that opens a file and throws an error to the standard output if the file does not exist, how do i get the error to be written into a log file in the same directory as the script? Also how do I go about checking if the file contains no data?
open(FILE, $file)|| die("$file\n$!, Cannot create files without test.txt\n");
Thanks.
I have a script that opens a file and throws an error to the standard output if the file does not exist, how do i get the error to be written into a log file in the same directory as the script? Also how do I go about checking if the file contains no data?
open(FILE, $file)|| die("$file\n$!, Cannot create files without test.txt\n");
Thanks.