foreach $word( @termList ) { if ( exists( $hash{ $word } ) ) { # Record occurrence of term } }