system("sort -t\\| +1 -2 <$file > $file.out ") or warn "sort failed $!\n";