in reply to Re: Trying to make a string generated like google
in thread Trying to make a string generated like google
my @sorted_phrases = sort { $b->{sort_number} <=> $a->{sort_number +}, $b->{count} <=> $a->{count} } values %$strings;
my @sorted_phrases = sort { $b->{count} <=> $a->{count} } values %$strings;
my @sorted_phrases_2; # my $i = 0; foreach (my $i = 0; $i <= $#sorted_phrases; $i++) { local $_ = $sorted_phrases[$i]; if ($i == 1) { print "BLA BLA XXX - \"$_->{count}\" " . Dumper($_); if ($_->{count} < 1) { my $chosen_id_now = $sorted_phrases[0]->{sort_number} ++ 1; print qq|<br />Current sort was: $sorted_phrases[0]->{ +sort_number} , and new one is $chosen_id_now <br />|; foreach my $tmp (@sorted_phrases) { if ($tmp->{sort_number} == $chosen_id_now) { push @sorted_phrases_2, $tmp; } } } } else { push @sorted_phrases_2, $_; } } @sorted_phrases = @sorted_phrases_2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Trying to make a string generated like google
by davorg (Chancellor) on Jun 30, 2010 at 07:50 UTC |