ABCD’ =˜ m/abc/i; what will happen?
A,D
Correct answer
Explanation
With the /i modifier, the regex becomes case-insensitive, so 'abc' matches 'ABCD'. The match returns true, and in list context or with special variables, would return 'ABC' (the matched portion). Option D 'abc' represents the successful match result (the pattern itself is a match). Option B 'D' is just a letter from the string, and option C 'ABD' is not a meaningful result of this match operation.