in reply to Re: A question About Array Indexing
in thread A question About Array Indexing

This is a correct assumption! The only variations: 1) The test scalar will be read from an input file. 2) The inclusive ranges are also read in from a text file with the following format:

chrX 1 60000 chrX 60038 60041 chrX 60446 60468 chrX 60689 61799 chrX 62272 62290 chrX 62703 62797

Writing all the inclusive ranges would take a fair amount of time as there are well over 20,000. Can they also be read in within this block of code?

Replies are listed 'Best First'.
Re^3: A question About Array Indexing
by AnomalousMonk (Archbishop) on Aug 27, 2013 at 00:54 UTC

    BrowserUk seems to answer these questions pretty well here.

    Update: Actually, upon closer inspection, I think I would change the statement
        my( $start, $end ) = split "\t", $_;
    in the  while( <INTERVAL> ) { ... } loop to
        my( undef, $start, $end ) = split "\t", $_;
    because the interval data seems to be three-field, tab-delimited records like
    chrX    1    60000
    in which the first field, to be ignored, is a label of some kind.