#/usr/bin/perl -w use strict; my %seen; my @uniq = grep !$seen{$_}++, <>; print map "$_\n", @uniq;