> >I'm unable to arrange the numbers in an array in ascending order.. I >tried the following > >@asc = sort{$a<=>$b} @list; > >but it didnt work. I did a subroutine >
What's your array's content? It do can work using Perl's sort (see below),also please see 'perldoc -f sort'. $ perl -le '@arr = (3,2,1,4,5);print join "\n",sort {$a <=> $b} @arr' 1 2 3 4 5 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/