http://www.perlmonks.org?node_id=86065


in reply to Re: Golf challange: match U.S. State names
in thread Golf challange: match U.S. State names

I think it is the principle of the thing that counts. How about:
AK AL AR AZ CA CO CT DC DE FL GA HI IA ID IL IN KS KT KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY
And the obvious answer is, of course,
sub state { grep$_[0]eq$_,'AKALARAZCACOCTDCDEFLGAHIIAIDILINKSKTKYLAMAMDMEMIMNMOMSM +TNCNDNENHNJNMNVNYOHOKORPARISCSDTNTXUTVAVTWAWIWVWY'=~/../g }
at 127 characters. I don't see an obviously better approach...