#!/usr/bin/perl my @a = ('a', 'b', 'c', 'c' ,'f', 'a', 'd'); my @b = grep (!$_{$_}++, @a);