diff options
Diffstat (limited to 'sortfunc')
-rwxr-xr-x | sortfunc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sortfunc b/sortfunc new file mode 100755 index 0000000000..fe9971fc84 --- /dev/null +++ b/sortfunc @@ -0,0 +1,9 @@ +#!/usr/bin/perl + +print sort byfuncname <>; + +sub byfuncname { + ($A) = $a =~ /\b(\w+) P\(/; + ($B) = $b =~ /\b(\w+) P\(/; + $A cmp $B; +} |