in reply to Storing unique values

If you want to preserve the sequence in which you got them, just inserting in a hash won't do as the keys will come back in a pseudorandom order. In that case, you need something like this:
#/usr/bin/perl -w use strict; my %seen; my @uniq = grep !$seen{$_}++, <>; print map "$_\n", @uniq;
You can also look up counts by changing the last line to something like
print map "$_: $seen{$_}\n", @uniq;

Makeshifts last the longest.