Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

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


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

Ah, so the \b makes the match fail, and thus nothing gets emitted to the result list in the map? Is that Kosher? That is, the pattern in list context returns all the captured things, but normally $1 etc. are improper to use after a match fails; they sometimes have garbage even. But using the result as list context doesn't have the same problem, because it "knows" it iterated zero times. Very interesting!

This is why golf is so interesting. Many thanks for the masterful demonstration.

—John

  • Comment on 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://224910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found