in reply to Storing unique values

I think this might work as is: let me know if not
use strict;
use vars qw ($outfile @array);
open(DATA, $ARGV[0]) or die "Couldn't open $ARGV[0]: $!";
$outfile = "testout.txt";
open (OUT, ">$outfile") || die "Can't open $outfile for creation: $!\n";
my (@array, %hash);
while (<DATA>) {
push (@array, $_) unless (defined($hash{$_}));
$hash{$_} = 1;
}
print OUT join("", @array);
Dr.J