%seen = ( paul => 1, jane => 1, betty => 1, ); #### print for keys %seen; # will print paul, jane, betty (though not necessarily in this order, see note below) #### $seen{paul} = 1; # this does absolutely nothing! but... ++$seen{paul}; # paul's *value* is 2 now print for keys %seen; # yet this still prints the same list #### @list = grep !$temp{$_}++, @list; # same thing, shorter.