in reply to Precompiling qr/.../o question

Yes, that is correct.   update: Because of the /o option the value of $xxx in the compiled regexp does not change.    See also What is '/o' really for?