in reply to Grep matches all elements if compiled regex is passed as EXPR
I would explain this by saying that there is no operator acting against the default variable $_ in test 2. Tests 1 and 3 could be rewritten $_ =~ m/y/ and $_ =~ m/$re/ but test 2 can't be rewritten as anything. In short, there's no operator, just a value, which will always be true.