A previous suggestion to use
"\Q$a\E"
is the easiest way to avoid these kind of problems. If you want to inlclude a variable that may contain meta-characters, then \Q forces the escaping of meta-characters (i.e. puts '\' before each one). \E turns escaping off. Play with it.
Hope that helps.
In reply to Re^2: Matching quoted variables. Cant make it work..
by Melly
in thread Matching quoted variables. Cant make it work..
by johntweed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |