in reply to Re^3: Stupid question about regex with string followed variable in replacement
in thread Stupid question about regex with string followed variable in replacement

In this case I wouldn't use '\Q' at all, since it has an effect while '\E' is quite neutral!

DB<100> $var=666 => 666 DB<101> "$var\Efoo" => "666foo" DB<102> "$var\Ef\Eoo" => "666foo"

Anyway the use case is restricted to interpolation like in qq{} or regex.

Curlies can be used for any variable.

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re^4: Stupid question about regex with string followed variable in replacement
  • Download Code