Now and then you want to include a variable string in a regular expression like this:
"if (/\w{1,4}$var_(\d*)/)"
Unfortunately, this will confuse the compiler, because it can't decide exactly what the variable name is, and incorrectly try to use "$var_". But the variable you wanted to use was "$var".