sub GetReferersBar{ my ($key,$value,%thishash,$bartext); # This line simply asserts that $i, when first declared and # converted to a number is zero. my ($i)==0; my ($nrefs,$n1,$n2); sub by_value { $a <=> $b }; sub printcells { my ($maxcols,$reference_to_values)=@_ ; my ($i,$html); my %thishash = %{$reference_to_values}; sub by_nhits { $thishash{$b}<=>$thishash{$a} }; foreach $key (sort by_nhits keys %thishash) { $html .= "
##
sub printcells {
my $href = shift;
my $html;
$html .= "$thishash{$_} "
foreach sort { $href->{$b} <=> $href->{$a} } keys %$thishash;
return $html
}
sub GetReferersBar {
my ($thisHash, $anotherHash) = @_;
my $bartext = "";
$bartext .= printcells($thisHash);
$bartext .= printcells($anotherHash);
$bartext .= "
" ;
return $bartext;
}
####
foreach my $key (map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
map { [ $_, $thishash->{$_} ] }
keys %$thishash;
####
sub ST_by_reverse_numeric {
local ($a, $b);
$b->[1] <=> $a->[1]
}