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

Re (tilly) 1: U.S. State Names

by tilly (Archbishop)
on Feb 26, 2001 at 08:28 UTC ( [id://60814]=note: print w/replies, xml ) Need Help??


in reply to U.S. State Names

You can always choose a slightly different delimiter...
%state_name = split /\s\s+/, q(AK Alaska LA Louisiana OH Ohio AL Alabama MA Massachusetts OK Oklahoma AR Arkansas MD Maryland OR Oregon AZ Arizona ME Maine PA Pennsylvania CA California MI Michigan RI Rhode Island CO Colorado MN Minnesota SC South Carolina CT Connecticut MO Missouri SD South Dakota DE Delaware MS Mississippi TN Tennessee FL Florida MT Montana TX Texas GA Georgia NC North Carolina UT Utah HI Hawaii ND North Dakota VA Virginia IA Iowa NE Nebraska VT Vermont ID Idaho NH New Hampshire WA Washington IL Illinois NJ New Jersey WI Wisconsin IN Indiana NM New Mexico WV West Virginia KS Kansas NV Nevada WY Wyoming KY Kentucky NY New York);

Replies are listed 'Best First'.
Re: Re (tilly) 1: U.S. State Names
by merlyn (Sage) on Feb 26, 2001 at 20:50 UTC
      Right down to the number of characters.

      I find \s\s+ slightly more obvious than \s{2,} but that is entirely a matter of taste.

      *shrug*

      (Something tells me that there is a remote chance that Ilya treats the {2,} construct as more complex, falls into a general case, and might not always optimize it as well. If you ask him, please tell me the answer.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-06-22 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.