codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  how do i sort in a descending order using perl Sort::External Module  ravikim at 12:07 on Sunday, November 29, 2009
 

Hi ,

use Sort::External;
$output = '/forum/1.txt';
open(FILE, $output);
my $sortex = Sort::External->new( mem_threshold => 1024**2 * 1024 );
while (<FILE>)
{
$sortex->feed($_); # tried to change it to ~$_ but did not work !!!!!
}
use Fcntl;
$sortex->finish(
outfile => '/forum/desc_1.txt', # comes in ascending order !!
flags => ( O_CREAT | O_WRONLY ),
);
close(FILE);

with the above code the file is getting sorted in ascending order. how do i sort in descending order ?

thanks in advance,
ravikim








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: checkbox verification..headache!!
•  JavaScript: Not working in Firefox 3.x
•  calling VC++ ATLCom Dll from javascript
•  need to enable a text area when the dropdown menus value is more than 0
•  checkbox verification..headache!!
•  Show / Hide Issue
•  Testing if object exists in IE
•  how do i sort in a descending order using perl Sort::External Module
•  need help creating mysql database for my java code


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009