The short answer is that ARRAY_REF is a reference and STRING is not.
What you put between ${} or @{} needs to be a reference. By itself, STRING is not a reference—it's just a string. To get a reference to that string, use the backslash. Hence: "${\STRING}". It's the same as "${\'.+?'}".
If you have a bareword between ${}, or a literal string, that's taken as the name of a variable ("${STRING}" is the same as "$STRING"). If you're using strict, then that's going to bomb (unless that variable's been declared somewhere).
ARRAY_REF is already a reference, so you don't have to backslash it. You do, however, have to keep "@{ARRAY_REF}" from being interpreted as "@ARRAY_REF", and so the "+" is there to mark it as an expression and not just a bareword.
In reply to Re: Constants refferences
by kyle
in thread Constants refferences
by leonidlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |