Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: golf anyone? (taking first field)

by Aristotle (Chancellor)
on Jan 07, 2003 at 10:44 UTC ( [id://224932]=note: print w/replies, xml ) Need Help??


in reply to golf anyone? (taking first field)

Update: 'tis broken. See sauoq's reply.

Do you really just want the first word, even if there are several before the colon? In that case, 21.

# 1 2 #23456789012345678901 map/^([^:\s]+)/,@list
If you want to allow optional whitespace at the start of a line, 24.
# 1 2 #23456789012345678901234 map/^\s*([^:\s]+)/,@list

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found