http://www.perlmonks.org?node_id=170574


in reply to correct usage of q, quotemeta, with s///

$page =~ s/\Q$old_text\E/$new_code/g;