mhgoeschl has asked for the wisdom of the Perl Monks concerning the following question:

I'm using named capture buffers within a non-scoping repeat (?: )+ structure where the buffer status (<mybuf> defined ?) is tested by an if-then-else sequence, e.g.: /(? ... (?(<mybuf>)(?:match something)|(?<mybuf>match something else)) ... )+/. Now, I would need to reset <mybuf> (to undef or defined value) within the regexp WITHOUT consuming any character of my match target. Since testing the buffer is possible using ?(<mybuf>), I'm speculating that resetting it should also be possible at runtime ?