in reply to Removing extra blank lines

Please show some code, because it is quite hard to understand what your problem is this way :-)

Anyway, as I'm going to attack this problem blind, remember this:

-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: Removing extra blank lines
by Anonymous Monk on Jun 04, 2002 at 17:32 UTC
    except that the ordering stays the same provided the hash does not change
    I wouldn't even rely on this. The current implementation does it this way, but there's no telling what could happen in the future. Hashes have no order whatsoever, and you shouldn't rely on the any side effects to get an order.

    I could see perl going to some type of lazy, hash rebalancing structure. In this model, when cpu usage is low, it reoptimizes the hash. If this were the case, then the order might change, even though you do alter any elements in the hash.

      It might change - but I suspect this will not happen before Perl6 arrives. The docs (or the camel book, I forget) explicitly say that the ONLY thing you can count on as far as hash-ordering goes, is that the ordering of keys, values and each on a hash will be identical. - The changes you suggest will break that.
      -- Joost downtime n. The period during which a system is error-free and immune from user input.