Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
271 B

  1. open foo, $ARGV[0] or die "can't open $ARGV[0]";
  2. $count = 0;
  3. while (<foo>) {
  4. $Array[$count] = $_;
  5. $count ++;
  6. }
  7. @sortedlist = sort( {$b <=> $a } @Array);
  8. $newcount = 0;
  9. while ($newcount < $count) {
  10. print $sortedlist[$newcount];
  11. $newcount++;
  12. }