##
print "$memory --- $processname
\n";
####
push(@allprocesses, $memory => " - $processname
",);
$memory = ""; # empty variable
$processname = ""; # empty variable
print "Unsorted Array:
@allprocesses \n" ;
####
%memhash=@allprocesses;
$anz=keys(%memhash);
print "Pair of Hashes: $anz
\n";
foreach $key ( sort {$b <=> $a} values %memhash){
$help1 = " $keys$memhash{$keys}";
print "Memory: $key Name: $help1
\n";
####
@sorted = sort({$b<=>$a}values(%memhash));
for ($i=0; $i<=$#sorted; $i++) {
my $paar = $sorted[$i];
print "$paar = $memhash{$paar}
" ;
}
print "\n" ;