note
tmharish
<p>
Track counts instead of assign 1 to hash:
</p>
<code>
use strict ;
use warnings ;
my @array = ( "54321", "54312", "5999", "54352", "12345" ) ;
my @original = ( "12345" , "54321" , "12345" ) ;
my %count ;
map( { $count{ $_ }++ } @original );
print "". ( ( $count{ $_ } ) ? "$_ Found $count{ $_ } times.\n" : "$_ Not Found\n" ) foreach ( @array ) ;
</code>
<p><b>Output:</b></p>
<code>
54321 Found 1 times.
54312 Not Found
5999 Not Found
54352 Not Found
12345 Found 2 times.
</code>
1020109
1020112