Thread Sorting processes (6 answers)
Opened by Gast at 2006-11-15 19:06

docsnyder
 2006-11-27 17:36
#8967 #8967
User since
2005-09-08
300 Artikel
BenutzerIn
[Homepage] [default_avatar]
@sde42dn

Quote
my @table_sort=sort { $a <=> $b }@table ;
foreach (@table_sort) {
print "$_\n";
}


Unfortunalety, this is not what is needed by MatoX23. He wants process ID's to be sorted by means of CPU time. Please consider, that, in your code, "1000" is lexicographically smaller than "5". Have a look at renee's posting, were he pointed out, that the "Schwartzian Transformation" will do the trick.

Greetz, Doc

View full thread Sorting processes