Try changing '>' to '>>'. If I remember correctly, open will silently reopen an already open handle. Since you are using truncating write mode, each file gets truncated every time it is opened.
In reply to Re^3: Split tab-separated file into separate files, based on column name (updated)
by jcb
in thread Split tab-separated file into separate files, based on column name
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |