Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Perl: the Markov chain saw
 
PerlMonks  

Re: Advanced Hash

by Russ (Deacon)
on Apr 13, 2001 at 18:54 UTC ( [id://72435]=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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72435]
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.