in reply to Sorting of numbers using arrays

   I think it is not possible using "SORT" key word.

Ummm, have you looked at the documentation for sort? It gives examples of doing just what you want to do, which is to sort an array of data. The code below sorts an array in ascending order and descending order using the sort command.

use strict; use warnings; use Data::Dumper; my (@unsorted) = qw(7 3 2 9 5 18 1 4); my @sorted1 = sort {$a <=> $b} @unsorted; my @sorted2 = sort {$b <=> $a} @unsorted; print Dumper @sorted1; print "---------\n"; print Dumper @sorted2;

   Please forward solution to following mail id-suneeldv@gmail.com

Hmmm....sorry, but I'll pass on that one. I could be wrong, but I'm not too sure how many (if any) monks will be willing to do that. You just might have to come back to the monastery to see if anyone has posted a solution that you like. In other words, I'm willing share a "solution" to your question, but I'm not willing share with you my personal email address.