Hi
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
$EGH0001_?SSSR0003_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.
Thanks
Mike
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.