aboutsummaryrefslogtreecommitdiff
path: root/contrib/seg/sort-segments.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/seg/sort-segments.pl')
-rwxr-xr-xcontrib/seg/sort-segments.pl29
1 files changed, 16 insertions, 13 deletions
diff --git a/contrib/seg/sort-segments.pl b/contrib/seg/sort-segments.pl
index 62cdfb1ffd7..a465468d5b8 100755
--- a/contrib/seg/sort-segments.pl
+++ b/contrib/seg/sort-segments.pl
@@ -2,19 +2,22 @@
# this script will sort any table with the segment data type in its last column
-while (<>) {
- chomp;
- push @rows, $_;
+while (<>)
+{
+ chomp;
+ push @rows, $_;
}
-foreach ( sort {
- @ar = split("\t", $a);
- $valA = pop @ar;
- $valA =~ s/[~<> ]+//g;
- @ar = split("\t", $b);
- $valB = pop @ar;
- $valB =~ s/[~<> ]+//g;
- $valA <=> $valB
-} @rows ) {
- print "$_\n";;
+foreach (
+ sort {
+ @ar = split("\t", $a);
+ $valA = pop @ar;
+ $valA =~ s/[~<> ]+//g;
+ @ar = split("\t", $b);
+ $valB = pop @ar;
+ $valB =~ s/[~<> ]+//g;
+ $valA <=> $valB
+ } @rows)
+{
+ print "$_\n";
}