Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re:{3} How to test equality of hashes?

by jeroenes (Priest)
on Jun 20, 2001 at 18:26 UTC ( [id://90004]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my %h1 = %{ $_[0] }; #h2 similar
    
  2. or download this
      my %h1 = (defined $_[0] and ref $_[0]) ? %{ $_[0] } : ();
    
  3. or download this
  4. or download this
      scalar grep { 
        my ($a, $b) = ( $h1{$_}, $h2{$_} );
    ...
          or
        $a ne $b 
      } @k1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://90004]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2024-04-18 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found