in reply to Getting rid of duplicates

If you are not married to a perl solution, use the unix utility sort -n -u < infile.txt

if you need a perl solution, try perl -e'my %list = (); $list{$_} = 1 while <>; print sort keys %list; ' < infile.txt


PJ
use strict; use warnings; use diagnostics;