You have a list of values with duplications, how can you create a unique list of the values?

examples/advanced/unique_values.pl
#!/usr/bin/perl 
use strict;
use warnings;

my @data = qw(Foo Bar Moose Foo Baz Bar);
my @unique;
my %seen;

foreach my $value (@data) {
    if (! $seen{$value}) {
        push @unique, $value;
        $seen{$value}++;
    }
}

print "@unique\n"; # Foo Bar Moose Baz