What is wrong with the following code?
I wish to write to subdirectory subFiles(created already)'s output.txt file(to be created). There is no output on terminal and no dying log, and worst still no files created either!
Please help!
I wish to write to subdirectory subFiles(created already)'s output.txt file(to be created). There is no output on terminal and no dying log, and worst still no files created either!
Please help!
Code:
use FileHandle;
open (FILE,"+< myFiles\output.txt") or die "cannot open file for writing";
$myOutput= "abcd";
print FILE $myOutput or die "cannot write";
#Tried without the following three lines as well!
FILE->setvbuf($buffer_var, _IOLBF, 1024);
($readfh, $writefh) = FileHandle::pipe;
autoflush STDOUT 1;
close(FILE);