<?xml version="1.0" encoding="windows-1252"?>
<node id="1015354" title="Re: Sorting the numbers: A little tricky." created="2013-01-25 09:30:09" updated="2013-01-25 09:30:09">
<type id="11">
note</type>
<author id="733061">
flexvault</author>
<data>
<field name="doctext">
&lt;p&gt;&lt;a href="http://www.perlmonks.org/?node_id=873192"&gt;oxydeepu&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Like everyone else, it is hard to understand the math. But your original question can be answered by reading the file one line at a time, do a 'chomp' and then 'split' the line into 2 strings. Then using a hash, populate it with keys and values where the value is greater than 4.&lt;/P&gt;&lt;p&gt;
Now you can process your hash using a 'foreach' with a numeric 'sort' of the 'keys' of the hash, and use whatever Perl math code you want to get whatever  results you want.&lt;/p&gt;&lt;p&gt;
Like all things in Perl, this is one of many ways to do it, so experiment.
&lt;/p&gt;
&lt;p&gt;Good Luck&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-733061"&gt;
&lt;p&gt;&lt;b&gt;"Well done is better than well said." - Benjamin Franklin&lt;/b&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1015288</field>
<field name="parent_node">
1015288</field>
</data>
</node>
