That keeps it from thinking you mean %match, but gives you m/Hello{2}/ (match "Hell", followed by two "o"s). To make the repeat apply to the whole $match, you need to group it: m/(?:${match}){$repeat}/, which makes the added {} unnecessary, leaving you with m/(?:$match){$repeat}/.
In reply to Re: Regex curly bracket ambiguity
by ysth
in thread Regex curly bracket ambiguity
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |