#!/usr/bin/perl use strict; use Tie::IxHash; tie %hash1,%hash2,"Tie::IxHash,APP"; my %hash1=(); open(APP,"eng_test1.txt"); #open(NEG,'eng_test2.txt'); while() { chomp; @keys=keys %hash1; } close (APP); open(NEG,"eng_text2.txt"); while() { chomp; @keys=keys %hash2; } close(NEG); open(OUT,">saetze_hash.txt") my @not=(); foreach(keys %hash1){ push(@not,$_) unless exists $hash2{$_}; } close(OUT);