in reply to Re: Calculating variable {n} in regex matchin thread Calculating variable {n} in regex match
my $rc = ($foo =~ /^(\d{@{[$i+1]}})$/