use strict; use warnings; print "Content-type: text/html\n\n"; my @records; while () { chomp; push(@records, [ split(/\|/) ]); } print "$_->[0]|$_->[1]|$_->[2]
\n" foreach sort { $b->[0] <=> $a->[0] } @records;