On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote:
: But I'd like to reserve < > for delimiting what is returned by $<>,
: the string officially matched:
: 
:     "foo bar baz" ~~ /:w foo < \w+ > baz/
:     say $/;   # foo bar baz
:     say $<>;  # bar

Though it occurs to me that there's another possible interpretation,
culturally speaking.  The overloading of \b has always bothered me,
plus the fact that \b can't distinguish which kind of word boundary
without additional context.  In regex culture, we have the \<...\>
word matcher, and maybe that devolves to isolated < ... > in rules.

We could still use << ... >> to capture $<>, which I was leaning toward
anyway just for visibility reasons, since the two ends could be quite
far apart.

And file globbing could just be :glob or some such if we really need
to embed it in rules.

Larry

Reply via email to