diff options
author | June McEnroe <june@causal.agency> | 2021-05-04 12:25:48 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-05-04 12:25:48 -0400 |
commit | efaa9d4fd7052f30d50f5e3888acc6f64fe27e4c (patch) | |
tree | 6962f09495c863c4924b995ded414a0352bf3867 /bin | |
parent | Emulate MANSECT for mandoc which lacks it (diff) | |
download | src-efaa9d4fd7052f30d50f5e3888acc6f64fe27e4c.tar.gz src-efaa9d4fd7052f30d50f5e3888acc6f64fe27e4c.zip |
Handle missing last names in bibsort
Diffstat (limited to '')
-rw-r--r-- | bin/bibsort.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/bibsort.pl b/bin/bibsort.pl index 89133c87..0d132c19 100644 --- a/bin/bibsort.pl +++ b/bin/bibsort.pl @@ -26,7 +26,7 @@ while (<>) { sub byLast { my ($af, $al) = split /\s(\S+)(,.*)?$/, $a; my ($bf, $bl) = split /\s(\S+)(,.*)?$/, $b; - $al cmp $bl || $af cmp $bf; + ($al // $af) cmp ($bl // $bf) || $af cmp $bf; } foreach $ref (@refs) { |