in reply to variables allowed inside iterative loops in regular expressions?

You can do your substitusion this way with the following code.
$a = 2; $b = "-"; $base = "ABCABC"; $stemp = "\/" . "ABC" x $a . "\/"; $regxp = eval 'qr' . $stemp; $base =~ s/$regxp/$b/g;
This returns a -

I know this is a bit brute force but it does work. Hope this helps. Edit:Hey I went back and changed the $a $b to other varables and the regular way works. ex.
$base =~ s/[ABC]{$multi}/$replace/g;
Three