Ing. Branislav Gerzo wrote:

Andrej Kastrin [AK], on Monday, December 19, 2005 at 10:41 (+0100)
typed:

AK> 00001   BRCA3   BRCA33|BRCA55   symbol 998
AK> 00002   ABCB1   DASH|BASG|AVGA4   symbol 7583
AK> In first step I split each row and store it in array; e.g.:
AK> @array=( '00001',  'BRCA3',  'BRCA33|BRCA55',  'symbol998')

if you want to split use split :) so simple, eh ?

perldoc -f split

I am not sure if split third column and add it to end to array is good
idea. I would use anonymous hashes for this, or AoA

So, following code split each line and print it.

while (<>){
@column = split(/\t/,$_); # split current line, field separator set to tab
   print OUTPUT "$column[0]\t$column[1]\tt$column[2]\n";

If I'm right, I have to split third column and store it to @AoA. But how to print it (instead of $column[2] in my example?




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to