Brent "Dax" Royal-Gordon wrote:

/ $foo:=(abc) $bar:=(def) /

Am I misreading, or are you suggesting that $foo may contain 'abc' after running this example, even if the match wasn't successful?

No. I re-checked with Larry this morning and he confirmed that all bindings in rules only "stick" if the rule as a whole succeeds.


What I was trying (obviously rather ineptly ;-) to point out is that we have to be able to differentiate between the the match object's own internal hypothetical variables ($?foo, $?bar, @?baz) and any external-but-temporarily-hypothesized variables ($foo, $bar, @baz).

The syntax we've chosen to do that requires the use of "?" as a secondary sigil on internal variables. So, since named subrules that capture always capture to internal variables, it's natural and consistent to use "?" to indicate capturing subrules as well.

Damian

Reply via email to