=========================================================== explai the procedure involved in this sorting...i mean what basis it is comparing with the values... actually arguments are stored in @_ inside subroutine..how does $a and $b gets the value.....is it like bubble sort....%output_pts =(7=>"raja",2=>"ananth",3=>"guru",4=>"uvaaraj"); @ptkeys = keys %output_pts; @sortedkeys = sort numeric_sort @ptkeys; print "\n@ptkeys"; sub numeric_sort { print " $a,$b "; $a cmp $b; }
In reply to help in sort by uva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |