use strict; use IO::File; my $owo = IO::File->new('owo.txt') or die "no open $!"; my %hash = (); my @list = (); # updated, i was on crack or something - i actually said # to localize $/ to slurp the contents into an array . . . DOH! my @ary = <$owo>; foreach my $item (@ary) { push(@list,$item) unless $hash{$item}++; } print join("\n", @list), "\n";