in reply to Sample Sort Code
#!/usr/bin/perl use warnings; use strict; our @rows; while (<>) { chomp; push @rows,[unpack("a10a13a6a8a13a5",$_)]; } @rows = sort { $a->[0] cmp $b->[0] || $a->[1] cmp $b->[1] || $a->[4] cmp $b->[4] } @rows;
Update: Fixed field sizes, which are clearer now that the post is cleaned up.
|
|---|