in reply to Re: Using previous match in the same matching regexpin thread Using previous match in the same matching regexp
my ($len,$substring) = ($string =~ /^(\d+) ((??{".{$1}"}))/); [download]