Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please

by petral (Curate)
on Nov 07, 2002 at 18:11 UTC ( #211161=note: print w/replies, xml ) Need Help??


in reply to [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please

sub by_priority { (grep$_,map-($a=~/$_/)||$b=~/$_/,qw(ORGANIZATION SERVICE FAQ))[0] or$a cmp$b }

  p
  • Comment on Re: [perlre/perlgolf] Golf this: return -1 or return +1 on regexp subroutine please
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://211161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2020-05-30 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (171 votes). Check out past polls.

    Notices?