Help for this page

Select Code to Download


  1. or download this
    @files = glob("/bin/*");
    @sorted = 
    ...
            map { sprintf "%012d %d", -s $files[$_], $_ } 
            0..@files-1];
    print "@sorted$/";
    
  2. or download this
    my @h = map -s, @files;
    @results = @files[sort {$h[$a]<=>$h[$b]} 0..@h-1];