Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
      @file = sort { $a <=> $b } @file;
    }
    
  2. or download this
    $perl myfile.pl -rn test.txt
    # Reverse the contents of test.txt and perform
    # a numeric sort on it.
    
  3. or download this
    # Sample runs:
    
    ...
    
    C:\perl>