in reply to Multiple if statements matching part of one variable problem
You are using the g modifier on the regex (why?). The first match positions pos($gw) after the 'c' so the subsequent match starts from there. For more info peruse Regexp Quote-Like Operators in perlop.
|
|---|