in reply to Wrong hash output

Put this before the first call to each %cluster_info:

keys %cluster_info;
and see if it helps. (Yes, that's a call to keys in a void context. Its purpose is to reset the each "iterator" associated with %cluster_info. See the discussion in this recent meditation for more on this.)

the lowliest monk

Replies are listed 'Best First'.
Re^2: Wrong hash output
by mathew_ (Novice) on Jul 17, 2005 at 22:28 UTC
    Thank you very much tlm, that is the answer I needed.

    As you can see from my original post, I had already figured out that using "keys" seemed to reset the iterator of %cluster_info, but I didn't know why it was off in the first place. Your pointer to the recent meditation and another look at "perldoc -f each" cleared things up for me.

    Thanks to everyone who responded for their help. This is my first time on this site and I am so grateful for the help finding a resolution before getting back to the office tomorrow morning. I think now I'd better review a lot of other code I've written for the same problem.

    -Matthew