Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
laziness, impatience, and hubris
 
PerlMonks  

Re: Advanced Hash

by knobunc (Pilgrim)
on Apr 13, 2001 at 20:24 UTC ( [id://72471]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Advanced Hash

As Russ pointed out, you are not making an array in the second case. However, you are also not comparing the hashes correctly in the first case since the %hashCompany might have additional stuff that you will not see. So:

my %hash1 = {a => 1, b => 2}; my %hash2 = {a => 1, b => 2, c => 3};

would pass your check above. You can quickly check that with keys() to see how big the hashes are and shortcircuit if they are different sizes.

Not that this helps answer your real question. I would try but I am not yet sure what you want your data structure to look like.

-ben

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72471]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.