perlquestion
Anonymous Monk
In my perl script, I have following lines,
<CODE>
Format REPORT =
Test
.
Sub one
{
open(REPORT,">output.txt");
write(REPORT);
#trying to send mail using this output.txt file
open(FILE,"output.txt");
system("mailx -s \"Testing Report\" name@company.com<$FILE");
}</CODE>
I am getting error message 'no message' when I execute the program. When I use this same mailx at the shell level, it sends the mail with the content in the file
What I am doing wrong in the code?
3