I have 2 hashes, %one and %two.

the ($key, $value) of %one is a span of time.

I need to compare this span of time over every $key of %two.

Here's what I have:

while (($key1, $val1) = each (%one)) {

        while (($key2, $val2) = each (%two)) {

                if (($key2 >= $key1) && ($key2 < $val1)) {
                        
                        push @match, $val2;
                }
        }
}

There are 10,000 , 5,000 records in %one and %two, and it keeps timing out.
( this is an http-request )

Is there a more efficient way?

Thanks.

-Jim Conte
http://www.jimconte.com

Reply via email to