in reply to Finding duplicate keys
while ( <FILE1> ) { $key = extract_key_from_line( $_); $file1_keys{$key} ++; } while ( <FILE2> ) { $check_me = extract_key_from_line( $_); do_something( $check_me) if exists $file1_keys($check_me); } [download]