my $string = 'abc!hu('; print "\Q$string\E\n"; # prints abc\!hu\( print quotemeta $string; # prints abc\!hu\( #### s/\Q$string\E/$replacement/; # or .. $qstring = quotemeta $string; s/$qstring/$replacement/; #### perldoc perlre perldoc perlop (the m// part) #### -- Joost downtime n. The period during which a system is error-free and immune from user input.