I have a variable $next which contains strings that might contain parenthesis e.g trna(tgc) I want to make this matching statement if ($data[$i][2]=~/$next/){ ..} and it always return false even if it’s true in reality. I tried this if ($data[$i][2]=~/trnA\(tgc\)/){ ..}and it works.
my question is : how to insert the ‘\’ in front of each parenthesis into the variable $next?
I have a variable $next which contains strings that might contain parenthesis e.g trna(tgc)
Share
I think you want
quotemeta: