in reply to 'sort -u' in perl

perl -e "my %hash; @hash{<>} = 1; print sort keys %hash;"

They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Replies are listed 'Best First'.
Re^2: 'sort -u' in perl
by cowboy (Friar) on Jul 06, 2006 at 19:39 UTC
    The op mentioned this was a huge file. Reading the entire thing into a hash, then performing 2 copies on the data (sort keys) is probably going to be very painful depending on how huge is huge.