Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Advanced Hash

by Russ (Deacon)
on Apr 13, 2001 at 22:54 UTC ( [id://72435]=note: print w/replies, xml ) Need Help??


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found