sub by_priority { for ( qw(Organization Service FAQ) ) { return -1 if $a =~ /^$_/; return 1 if $b =~ /^$_/; } return $a cmp $b; }
In reply to Re: [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please
by fglock
in thread [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |