Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re (tilly) 4: Golf challange: match U.S. State names

by tilly (Archbishop)
on Jun 06, 2001 at 06:20 UTC ( #86101=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub state{
    $_[0]=~/^\w\w\z/&&grep/$_[0]/,'WVTNHINMSCORIDCAKSDE WIALAR MNCTX NVAZ'
    +,'FLGAILKTKYMAMDMEMIMOMTNDNENJNYOHOKPAUTWAWY'=~/../g
    }
    
  2. or download this
    sub state {
    pop=~/^([CGILPVW]A|[CKUV]T|[HRW]I|A[KLRZ]|CO|DC|DE|FL|I[DLN]|KS|KY|M[A
    +DEINOST]|N[CDEHJMVY]|O[HKR]|SC|SD|TN|TX|WV|WY)\z/
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://86101]
help
Chatterbox?
[Discipulus]: was global var or global war?!?
[Discipulus]: hey doc, you said global var?!

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2017-04-29 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.