<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1001021" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1001021</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004362</link>
    <description> &lt;p&gt;@arr = sort {$b &amp;lt;=&amp;gt; $a} @arr;&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;strong&gt;Termites eat through wood two times faster when listening to rock music.&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 15 Mar 2000 14:18:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1004362 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004361</link>
    <description> &lt;p&gt;Do you know how I can modify the code to handle the sorting of numeric values above 9?&lt;/p&gt;
 </description>
     <pubDate>Wed, 15 Mar 2000 05:47:00 +0000</pubDate>
 <dc:creator>dave123</dc:creator>
 <guid isPermaLink="false">comment 1004361 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004360</link>
    <description> &lt;p&gt;&lt;strong&gt;Robp&lt;/strong&gt; Would you be willing to help me out with my web site? i.e. make scripts and tutorials. I&#039;ve seen a ton of your postings around the forum and you seem to be as knowledgable (if not more) about perl as me. &lt;/p&gt;
&lt;p&gt;Want to help out?&lt;br /&gt;
email me &lt;a href=&quot;mailto:brandony2ok@hotmail.com&quot;&gt;brandony2ok@hotmail.com&lt;/a&gt; (nice email isn&#039;t it  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 15 Mar 2000 00:15:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1004360 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004359</link>
    <description> &lt;p&gt;&lt;strong&gt;Robp&lt;/strong&gt; That would work fine but what if he&#039;s going to have more than 9 entries into the database?&lt;/p&gt;
&lt;p&gt;Remember sort will work but it will only sort by the first number of every line.&lt;/p&gt;
&lt;p&gt;So if he had 1 15 25 12 it would sort it as&lt;br /&gt;
1 15 12 25... and thats not good  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 15 Mar 2000 00:04:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1004359 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004358</link>
    <description> &lt;p&gt;So if it had&lt;/p&gt;
&lt;p&gt;1|Title|Image|Message\n&lt;br /&gt;
2|Title|Image|Message\n&lt;/p&gt;
&lt;p&gt;you would just want it to be&lt;br /&gt;
2|Title|Image|Message\n&lt;br /&gt;
1|Title|Image|Message\n&lt;br /&gt;
?&lt;/p&gt;
&lt;p&gt;That doesn&#039;t seem hard, just try:&lt;br /&gt;
&lt;BLOCKQUOTE&gt;code:&lt;/blockquote&gt;&lt;/p&gt;
&lt;pre&gt;
open(IN,&quot;&amp;lt;IN.txt&quot;);
@arr = &amp;lt;IN&amp;gt;;
close(IN)

@arr = sort @arr;
@arr = reverse @arr;

open(IN,&quot;&amp;gt;IN.txt&quot;);
print IN @arr;
close(IN);
[/code]


------------------
&lt;strong&gt;Termites eat through wood two times faster when listening to rock music.&lt;/strong&gt;

[This message has been edited by robp (edited 14 March 2000).] &lt;/pre&gt;</description>
     <pubDate>Tue, 14 Mar 2000 23:31:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1004358 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/reverse-sorting-perl#comment-1004357</link>
    <description> &lt;p&gt;I believe I have something for you.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
for my $x (0..scalar(@array)) {
   $id[$x] .= &quot;|&quot; . $rest[$x];
}

@sorted =
map { join &quot;|&quot;, @$_ }
sort { $b-&amp;gt;[1] &amp;lt;=&amp;gt; $a-&amp;gt;[1] }
map { [ split /\|/ ] }
@array; 
[/code]

you may have to change the code around a little but you get the ideas.... &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Tue, 14 Mar 2000 21:53:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1004357 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
