Help for this page

Select Code to Download


  1. or download this
    @array=(2, 3, 1, 0);
    foreach (sort @array){
      print "$_ - ";
    ...
    0 - 1 - 2 - 3 - (printed in loop)
    2 - 3 - 1 - 0   (after loop, still unsorted)
    0 - 1 - 2 - 3   (after sorting, now sorted)