BioGeek has asked for the wisdom of the Perl Monks concerning the following question:
my $ranking_dgp = 0; do { my $gene = $1; my $chromosone = $2; my $score_dgp = $3; $ranking_dgp = $ranking_dgp + 1; push @gene_score, [ $gene, $chromosone, $score_dgp, $ranking_d +gp ]; } while ( $text =~ m{gene\=(ENSG\d+).*?<TD>\s+(\d+|X|Y)\s+</TD>.*? +<TD>.*?<TD>.*?<TD>.*?<TD>\s(\d.\d+)\s\<\/TD\>}gsm); print Dumper @gene_score;
$VAR1 = [ undef, undef, undef, '1' ]; $VAR2 = [ 'ENSG00000165659', '13', '0.738681', 2 ]; $VAR3 = [ 'ENSG00000184226', '13', '0.627447', 3 ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding rank to a match in while loop.
by japhy (Canon) on Aug 13, 2004 at 14:05 UTC | |
|
Re: adding rank to a match in while loop.
by fletcher_the_dog (Friar) on Aug 13, 2004 at 14:40 UTC | |
by BioGeek (Hermit) on Aug 13, 2004 at 15:36 UTC | |
|
Re: adding rank to a match in while loop.
by Limbic~Region (Chancellor) on Aug 13, 2004 at 14:44 UTC | |
by BioGeek (Hermit) on Aug 13, 2004 at 15:41 UTC |