in reply to Re^2: comparing two array
in thread comparing two array

Considering all the values in %h are 1, it doesn't make any difference whether you use exists $h{$elem}, defined $h{$elem} or $h{$elem}.