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?? |
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
In Section
Seekers of Perl Wisdom
|
|