If three or more arguments are specified then the mode of opening and the filename are separate. If MODE is '<' or nothing, the file is opened for input. If MODE is '>' , the file is truncated and opened for output, being created if necessary. If MODE is '>>' , the file is opened for appending, again being created if necessary.
Both > and >> will create a file. > empties the file and >> appends. Your post has that backwards.
In reply to Re^3: print() on Closed File Handle Error!
by kennethk
in thread print() on Closed File Handle Error!
by twaddlac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |