I write the script to generate the report, I need to add data to the file,and create the heading if it is a new page. I donot know why it keeps addding the heading to the file every time I run the script.I do not know what is wrong with my script, pls help me, thanks
if($status == 0) { $Msg=<<MSG; Copy is successful!!! MSG sendAdminMessage($Msg, \@emailAddressAdmins); #Generate the log file open(OUTFILE, ">>$outputFile") || die "Unable to open file[$outputFile +] for writing: $!\n"; $| = 1; # Auto-flush output = on print "page number [$=]\n"; write OUTFILE; close OUTFILE; # Output formatting: ========================================================= format OUTFILE_TOP = Staff Extra Bulletin Log Pg @<< $% Filename Last-Updated Current ====================================================== . format OUTFILE = @<<<<<<<<<<<<< @<<<<<<< @<<<<<<<< $fileone,$oldTime,$newTime . + } else { exit(0); }
In reply to append text to a file by mhoang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |