<?xml version="1.0" encoding="windows-1252"?>
<node id="847271" title="Re^3: Trying to make a string generated like google" created="2010-06-30 03:50:18" updated="2010-06-30 03:50:18">
<type id="11">
note</type>
<author id="2680">
davorg</author>
<data>
<field name="doctext">
&lt;p&gt;I've just logged on for the first time for almost a year and saw your unanswered question. It's really quite simple.&lt;/p&gt;
&lt;code&gt;
my @sorted_phrases = sort {
  $b-&gt;{count} &lt;=&gt; $a-&gt;{count}
    or
  $b-&gt;{sort_number} &lt;=&gt; $a-&gt;{sort_number}
} values %$strings;
&lt;/code&gt;
&lt;p&gt;It's really worth reading the Perl FAQ. See [http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-an-array-by-(anything)%3f|How do I sort an array by (anything)?]&lt;/p&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-2680"&gt;
-- &lt;br&gt;
&lt;small&gt;
&lt;p&gt;See the &lt;b&gt;Copyright notice&lt;/b&gt; on my [id://2680|home node].&lt;/p&gt;
&lt;p&gt;[http://mag-sol.com/train/public/|Perl training courses]&lt;/small&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
781591</field>
<field name="parent_node">
787340</field>
</data>
</node>
