Output with Filehandles
Writing to a file. This is similar to the command for reading a file, but a greater-than sign is placed in front of the filename.
open(OUT, “>outputfile”); # Opens file for writing
Appending to a file is the same, except two greater-than signs are used.
open (OUT, “>>outputfile”); # Opens file for appending
Please read the disclaimer.