- or download this
%seen = (
paul => 1,
jane => 1,
betty => 1,
);
- or download this
print for keys %seen;
# will print paul, jane, betty (though not necessarily in this order,
+see note below)
- or download this
$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
- or download this
@list = grep !$temp{$_}++, @list; # same thing, shorter.