No, if you open with ">", it means "open a file for writing, creating a new file if needed or else truncating an old file" *) so amazingly, you can actually print to the file after you've opened (and cleared) it. You don't need to reopen with ">>" mode, because the only difference between them is that ">>" mode does not clear the file first.
Repeat after me: perldoc perlopentut is there for a reason.
*) sentence taken from perldoc perlopentut
| [reply] |
When you append, you preserve the contents of the file and add data at the end. From your description of what you are trying to do, you don't want to keep what is already there and therefore it is not an append. Rather than be incredulous of the answers already given to you, try it out. You may be surprised that someone knows more than yourself.
| [reply] |