I have a array that has a value with special characters in it and I need to match them.
Example: @INCOND1 = $EGH0001_#SSSR0002_OK^ODAT^AAA^$EGH0001
The entries are with in an array and I am grepping on a an array where I am matching the value from one array to another array.
$OUTDOCOND = "$EGH0001_#SSSR0002_OK"; Or could be $OUTDOCOND = "$EGH0001_?SSSR0003_OK";
my @answerO = grep /^\Q$OUTDOCOND\E\^/, @INCOND1;
Sometimes the data is not matching even if its in the array.
Tried the \Q and \E but not sure if this is working completely.
The 3 special characters in the array are $ # ?
Not sure if there is another way to \? or \# or \$ the beginning values.