Well, let me address a couple points first.
@{$hashCompany{$vars[1]}} = join(',',@vars[0,1]);
This isn't a hash of arrays. It is just a hash of scalars.
You don't need to use
@{} because
join(',',@vars[0,1]) is not a list; it is just a string.
You don't need to make perl interpolate $data[0] - just drop the quotes.
So, since we are only comparing two hashes, you have already mentioned one technique. Check out Re: diff of two hashes. for other ways to compare hashes (show keys in first hash that are not in second, show keys in second hash that are not in first).
Russ
Brainbench 'Most Valuable Professional' for Perl
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.