Here noun I am verb this is me Theres advb nowhere else on earth Id rather be #### foreach (keys %tagdict){ print CF $tagdict{$_} if exists $tagcorpus{$_}; } #### open DF, 'd.txt' or die $!; my %tagdict; while () { chomp; my ($word, $cat) = split; $tagdict{$word} = $cat; } while ( ($k,$v) = each %tagdict ) { #print "$k => $v\n"; } close DF; open CF, '+) { chomp; my @cwords = split; @tagcorpus{@cwords} = (1) x @cwords; } while ( ($k,$v) = each %tagcorpus ) { #print "$k => $v\n"; } close CF; open CF, '+## foreach $key(keys %tagcorpus){ #print "\n$key"; return($key); } #### while ( ($k,$v) = each %tagcorpus ) { #print "$k => $v\n"; }