Help for this page
foreach my $entry (@file1) { $index{$entry} = 1 ... foreach my $entry (@file2) { $index{$entry} += 2; }
foreach my $entry (@file1) { $index{$entry} = 1 ... # '||0' is to still the warnings under 'use warnings' $index{$entry} += 2 if (($index{$entry}||0) < 2); }