in reply to [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please
sub by_priority { for ( qw(Organization Service FAQ) ) { return -1 if $a =~ /^$_/; return 1 if $b =~ /^$_/; } return $a cmp $b; } [download]