Opening in '>' mode will clobber, of course, but opening inside of a tight loop can be inefficient. Another solution could be to truncate to 0, and then seek to 0 before printing again. But I have no idea if that's actually less inefficient.
Dave
In reply to Re^3: Writing to file with filehandler in variable, scope issue, clobber becomes append
by davido
in thread Writing to file with filehandler in variable, scope issue, clobber becomes append
by Marcool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |