> 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;
> }
> }
> }
>

Look at the replies given here earlier.
I ran some benchmarks with while and grep, and your while loop didnt look
less efficient.
I think the timeout has another reason.
Try putting some warns in your code and check the webserver's logfile.

Maarten.

Reply via email to