in reply to substitution issue
* Unless you have a very weird locale in effect.
$flag is set to a string consisting of \w characters.
No.