Re: Code assertions to spy on regexps behavior

2020-06-17 Thread Joseph Brenner
> It doesn't have to be an assertion. Just a code block would do the same. Yes, good point. In the docs, in the section Regex Interpolation, they don't mention that feature, presumably because it literally does no interpolation, but I'd argue that the null case is worth including in this table:

Re: Code assertions to spy on regexps behavior

2020-06-14 Thread Vadim Belman
It doesn't have to be an assertion. Just a code block would do the same. Best regards, Vadim Belman > On Jun 14, 2020, at 8:55 PM, Joseph Brenner wrote: > > $_ = "Alpha beta gamma"; > my @matches = m:g/(a) /;

Code assertions to spy on regexps behavior

2020-06-14 Thread Joseph Brenner
By the way, I've been finding code assertions are a fun way of spying on what's going on with your regexps: $_ = "Alpha beta gamma"; my @matches = m:g/(a) /; # 5 # 10 # 13 # 16