in reply to Re: Using previous match in the same matching regexp
in thread Using previous match in the same matching regexp

Tightening up just a wee bit more...
my ($len,$substring) = ($string =~ /^(\d+) ((??{".{$1}"}))/);