in reply to Re: Array of arrays used within object
in thread Array of arrays used within object
...so that I could get a "1" back if a given base was within any of the regions defined with nreg. As this was all within one script, it was easy to use @nreg globally and re-set it at the top of a "while while (my $seq = $filein->next_seq()) " loop.sub isitin { my ($hit,$what) = @_; my $within = 0; my $k; for ($k=0; $k<@nreg; $k++) { if ($what >= $nreg[$k][0] and $what <= $nreg[$k][1]) { $within = 1; } } return $within; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Array of arrays used within object
by esh (Pilgrim) on Aug 08, 2003 at 01:26 UTC | |
by knirirr (Scribe) on Aug 08, 2003 at 09:29 UTC | |
|
Re: Re: Re: Array of arrays used within object - crude substitute
by knirirr (Scribe) on Aug 07, 2003 at 15:44 UTC | |
by esh (Pilgrim) on Aug 08, 2003 at 01:36 UTC |