in reply to Re^2: Bug with nested named capture buffers
in thread Bug with nested named capture buffers

Great! Two quick tips:

if scalar(@$v)>=1;
can be written as
if @$v;

If you could please avoid <pre>...</pre> on PerlMonks. <c>...</c> is preferred. It also saves you from encoding "&", "<" and ">"