Thanks guys!

The reason I went with a hash instead of an array is because I need to know the difference and the key at the same time, IE it is key 1 that has a difference of 1, or key 6 that has a difference of -2. Each key is a radio, and I need to know where to send the crew to fix the radio that fell out of alignment.

I'm not opposed to using arrays, I simply thought since I needed the value relative to the key, a hash was the way to go.

It is possible that I get a key in one hash that doesn't appear in another. If a new radio is added without me changing the "perfect" hash then the 'unique' key would appear in hash2, and if a radio loses power or connection then the 'unique' key would appear in hash1. Is there a simple escape from that problem, or should I just let it error out?


In reply to Re^2: How best to compare hash values? by jimbass
in thread How best to compare hash values? by jimbass

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.