From bbcc1a9ae34558a001bbeacd57aab4791ee0a2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 22 Jul 2021 12:16:02 +0200 Subject: fref.t: Improve Perl script --- fref.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fref.t b/fref.t index f910a40..a84c442 100644 --- a/fref.t +++ b/fref.t @@ -179,8 +179,8 @@ $i++ if /^[^%]/ and $e[$i] =~ /^%/m; $e[$i] .= $_; END { print for sort { f($a) cmp f($b) } @e } sub f { - return $1 if $_[0] =~ /^%la.(.)/m; - return $1 if $_[0] =~ /^%au.(.)/m; + return $1 if $_[0] =~ /^%la.(.*)$/m; + return $1 if $_[0] =~ /^%au.(.*)$/m; } .PP If you keep your references in a separate file, -- cgit v1.2.3