in reply to a way to do 'sort|uniq'
perl -e 'print sort keys %{{map{$_=>1} <>}}' unsorted_redundant_file.t +xt
See: Perl Idioms Explained - keys %{{map{$_=>1}@list}} in our Tutorials.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: a way to do 'sort|uniq'
by xdg (Monsignor) on Aug 02, 2005 at 18:38 UTC |