You want a one liner and I doubt it'll be very readable.
The clever way is to split the head line and to open files for each entry and to hold the filehandles in an array.
Now you can print each field by column position after splitting the remaining lines.
That's a dozen code lines at most. ..
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Split tab-separated file into separate files, based on column name
by LanX
in thread Split tab-separated file into separate files, based on column name
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |