in reply to Re^3: \g{-2} for inside (?{ ... }) (repeat)
in thread \g{-2} for inside (?{ ... })

Indeed! I misunderstood the documentation.

use 5.010; # re features use strict; use warnings; for ('abcdef') { m{ (?(DEFINE) (?<x> (?<i1> . ) (?<i2> . ) (?{ '...' }) ) (?<y> (?<i1> . ) (?<i2> . ) (?{ print("($+{i1},$+{i2})") }) ) (?<z> (?<i1> . ) (?<i2> . ) (?{ '...' }) ) ) (?&y)+ }x; } print("\n");