Hi ,
use Sort::External;
$output = '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 => '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