Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

tc1364's scratchpad

by tc1364 (Beadle)
on Oct 11, 2004 at 17:34 UTC ( [id://398225]=scratchpad: print w/replies, xml ) Need Help??

Here is my question, I need to compare the keys and values between two hashes and log where the differences are to include the reporting hash, key and value. Can you please provide me some assistance? I did look at the information at http://perlmonks.thepen.com/1825.html but was not able to peice enough of it together. What I have done is use my Perl Cookbook to write the below code. It would be great to use hashes instead. %seen = (); foreach $item (@eadas58b) { $seen{$item} = 1 } foreach $item (@eadas58a) { unless ($seen{$item}) { print "Section 58 Inconsistent Data: $item\n"; } } %seen = (); foreach $item (@eadas153b) { $seen{$item} = 1 } foreach $item (@eadas153a) { unless ($seen{$item}) { print "Section 153 Inconsistent Data: $item\n"; } }
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found