If you want to play amusing games with this problem, you could implement a crude Radix Sort:
require v5.8.0; open INPUT, '<', '/path/to/the/file/where/the/data/are.stored'; my @line = <INPUT>; close INPUT; for (reverse 8..13) { @line = sort {substr($a,$_,1) <=> substr($b,$_,1)} @line; } print @line;
In reply to Re: Sorting a text file
by jonadab
in thread Sorting a text file
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |