in reply to How can I sort this data on the first field
use strict; use warnings; my ($c, @data); while (<DATA>) { chomp; $data[$c++] = [split /\|/]; } print join('|', @$_) . "\n" for (sort {@$a[0] <=> @$b[0]} @data); __DATA__ 30|microsoft 70|aol 76|netscape 35|mozilla 40|opera
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How can I sort this data on the first field
by Chady (Priest) on Apr 25, 2005 at 09:48 UTC | |
by jhourcle (Prior) on Apr 25, 2005 at 13:28 UTC | |
by Chady (Priest) on Apr 25, 2005 at 17:29 UTC |