onegative has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to figure out how to accept a string which contains regular expression characters as part of the string's value but do not represent regEx functionality to grep that string out of another array with the perl grep function but to escape it as a literal character???
string = DB2$PB
string = SYSA$
So I am extracting this string from one array and then trying to use perl's grep to verify its existence in another array. The problem is that I am not sure how I can convert the extracted string's special characters to have an escape in front of them? I tried using substitution but again the $ is being read as a regEx character. Any help would be greatly appreciated.