- or download this
-r--r--r-- 1 yourname 8318 Jan 30 1996 file1.txt
-r--r--r-- 1 yourname 11986 Jan 30 1996 file2.txt
-r--r--r-- 1 yourname 46852 Feb 27 1996 file3.txt
-r--r--r-- 1 yourname 72698 Feb 27 1996 file4.txt
- or download this
@sorted_by_size =
map { $_->[0] }
sort { $a->[1] <=> $b->[1] }
map { [$_, -s] }
@files;
- or download this
1. Map the initial list into a list of ref to lists with the original
+and modified values
2. Sort the list of references
3. Map the list of ref back into a plain list with the initial values