- or download this
if ($line=~ /(\d{1,3},\d{3,3},\d\d\d K)/){ # e.g. 3,373,560 K
$processname=" $`"; # matches before string
$memory = $& ; # $& matches the string
- or download this
print "$memory --- $processname <br>\n";
- or download this
push(@allprocesses, $memory => " - $processname <br>",);
$memory = ""; # empty variable
$processname = ""; # empty variable
print "<td width=\'400\' height=\'15\'>Unsorted Array: <br> @allproce
+sses </td> \n" ;
- or download this
%memhash=@allprocesses;
$anz=keys(%memhash);
...
foreach $key ( sort {$b <=> $a} values %memhash){
$help1 = " $keys$memhash{$keys}";
print "Memory: $key Name: $help1 <br> \n";
- or download this
@sorted = sort({$b<=>$a}values(%memhash));
...
print "$paar = $memhash{$paar} <br>" ;
}
print "</td></tr>\n" ;