puts ARGF.sort_by{|l|l.split(/\s+/)[0].to_i} [download]
In reply to Re: Sorting within a file by Fletch in thread Sorting within a file by Anonymous Monk