in reply to Storing unique values

The "kind of array" you are looking for is called a hash:

my %unique; while( <>) { chomp; $unique{$_}=1; } print join "\n", keys %unique;