in reply to Pragma inside grep block
Yes, this could be done better, but fiddling with the perl 5 lexer is non-trivial and not for the faint of hearted.