in reply to Print function
Looks to me like all the sections except the first one look the same, right? Why do you repeat the code then? Use a loop:
Also please do be consistent with the code formatting.for my $id (1..11) { if($cytokine[2*$id+1]=~/\S+/ and exists $ING{$cytokine[2*$id+1]}) { print OUT "$cytokine[2*$id]\t$cytokine[2*$id+1]\tY\t"; } elsif ($cytokine[2*$id+1] =~ /\d+/) { print OUT "$cytokine[2*$id]\t$cytokine[2*$id+1]\tN\t"; } else { print OUT "$cytokine[2*$id]\t$cytokine[2*$id+1]\t\t"; } }
This aside ... I do not understand when do you want to print the counts. Line #921 doesn't mean anything to me. Do you want to pring it after you process all the lines from CytokineArrays.txt? Or earlier? And if so, when?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Print function
by de2425 (Sexton) on Sep 02, 2008 at 16:10 UTC | |
by Jenda (Abbot) on Sep 02, 2008 at 16:22 UTC | |
by jwkrahn (Abbot) on Sep 02, 2008 at 16:47 UTC | |
by de2425 (Sexton) on Sep 02, 2008 at 19:51 UTC |