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

Re: Re: Re: Re: golf anyone? (taking first field)

by John M. Dlugosz (Monsignor)
on Jan 07, 2003 at 08:25 UTC ( [id://224906]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: golf anyone? (taking first field)
in thread golf anyone? (taking first field)

Yea, that's what I noticed when I decided to throw it out as a golf: stopping at the colon or the end-of-line complicates things in a slightly subtle manner. Doing it in multiple passes it's no big deal: chomp first, then delete the tail end stuff, then throw it away if empty. But that's not elegant, and it doesn't just "fit together" as a composition of functions (one feeding the result to the next outer one).

I think this also has an interestingly high punctuation to alpha ratio.

I see you make sure the pattern always matches, so $1 is always OK (just empty).

—John

  • Comment on Re: Re: Re: Re: golf anyone? (taking first field)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found