in reply to Inserting sequences without duplicates

First of all see How (not) to ask a question.

You need something like:

my %seen; for (@input) { $seen{$_}++ && warn "$_ already entered\n"; }
-- Joost downtime n. The period during which a system is error-free and immune from user input.