in reply to Hash of array of hash access

What I need to do is check the uplinks array for an existing connection. If there is already an entry in the uplinks list, don't push.

With your use of the phrase "an entry," it sounds like you are saying that you don't want to push if the array already has one or more members. I have a feeling that's not what you mean though. Do you mean that or do you mean that you don't want to push $connection onto your array if it already exists in your array?

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re^2: Hash of array of hash access
by Ransom (Beadle) on May 14, 2012 at 16:54 UTC

    Sorry for not being clear. sauoq is correct, I would like to check if the particular $connection is already in the array before pushing.

    A recent change in the code brings some duplicate connections in. While this is technically correct, when displaying the results (the code I'm working on), I want just a single entry per unique connection.

    Ransom