in reply to Re^3: Variable substitute and capturing
in thread Variable substitute and capturing

You're right. Even without qr//. I've updated my post.
# qr & no eval $s = qr/\\/; $t = "\\\\"; $t =~ s/$s/!/; print("$t\n"); # qr & eval $s = qr/\\/; $t = "\\\\"; eval "\$t =~ s/$s/!/"; print("$t\n"); # qr & no stringification $s = qr/\\/; $t = "\\\\"; eval "\$t =~ s/\$s/!/"; print("$t\n"); print("\n"); # qq & no eval $s = "\\\\"; $t = "\\\\"; $t =~ s/$s/!/; print("$t\n"); # qq & eval $s = "\\\\"; $t = "\\\\"; eval "\$t =~ s/$s/!/"; print("$t\n"); # qq & no stringification $s = "\\\\"; $t = "\\\\"; eval "\$t =~ s/\$s/!/"; print("$t\n");

The regexp still gets stringified and recompiled, though.

This all goes to prove the value of a template system.