((??{$+ + 1}))+ matches null string many times before HERE mark in regex m/^(\d)((??{$+ + 1}))+ << HERE $/ at ./test.pl line 8.