So I don't know whether it really helps, but here's part of my "motherfile". There are more columns for more VP's and there are more lines for more TargetID's. So the motherfile contains all data and I want to extract per VP one file with the first four columns and the belonging VP*.***-columns. Huh, I'm sorry that I'm not really capable of explaining it well.
open(RAUS,$outfile); while (<REIN>) { chomp(); @we = split(/\t/); $fix = "$we[0]\t$we[1]\t$we[2]\t$we[3]"; $out1 = "$we[4]\t$we[5]\t$we[6]\t$we[7]\t$we[8]\t$we[9]\t$we[10]\t +$we[11]\t$we[12]"; print RAUS $fix ."\t" .$out1."\n"; } close(RAUS); close(REIN);
 This is part of my very nasty code for printing the right stuff for one VP, but it is highly useless for the entire file.. =)
Here's my data:

Index	TargetID	ProbeID_A	ProbeID_B	VP1.AVG_Beta	VP1.Intensity	VP1.Avg_NBEADS_A	VP1.Avg_NBEADS_B	VP1.BEAD_STDERR_A	VP1.BEAD_STDERR_B	VP1.Signal_A	VP1.Signal_B	VP1.Detection Pval	VP2.AVG_Beta	VP2.Intensity	VP2.Avg_NBEADS_A	VP2.Avg_NBEADS_B	VP2.BEAD_STDERR_A	VP2.BEAD_STDERR_B	VP2.Signal_A	VP2.Signal_B	VP2.Detection Pval
1	cg00000029	14782418	14782418	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00
2	cg00000108	12709357	12709357	0,9218118	3609	12	12	44,74464	155,0186	190	3419	0,00	0,9602971	7305	11	11	35,27683	130,8559	194	7111	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00
3	cg00000109	59755374	59755374	0,650519	767	4	4	51,5	151,5	203	564	0,00	0,8245264	1906	10	10	24,03331	136,6104	252	1654	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00
4	cg00000165	12637463	12637463	0,3073516	1029	20	20	59,47941	28,39806	682	347	0,00	0,2899073	1842	17	17	80,52183	51,41755	1279	563	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00
5	cg00000236	12649348	12649348	0,8236473	1397	14	14	18,17377	105,0337	164	1233	0,00	0,8691943	3065	13	13	42,71191	160,031	314	2751	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00
6	cg00000289	18766346	18766346	0,4625375	901	14	14	48,37429	46,23619	438	463	0,00	0,590708	1256	11	11	78,69446	89,85038	455	801	0,00	0,7469755	2793	15	15	33,82405	72,03749	632	2161	0,00	0,6678689	2950	18	18	96,40222	126,8078	913	2037	0,00 

In reply to Re^2: Spliting Table by tschelineli
in thread Spliting Table by tschelineli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.