From: Robert Klemme Date: 2005-10-06T18:11:48+09:00 Subject: Re: One-liner removing duplicate lines Damien Wyart wrote: > Many thanks to everyone who responded, the answers are very > interesting and enlightening ! As far as I can see noone used the Hash with block feature. So here it is: ruby -e 'h=Hash.new(){|ha,l| puts l;ha[l.freeze]=1};ARGF.each {|l| h[l]}' (David, I'm sorry again this is no #inject solution.) Kind regards robert