my $string = '\\this is a test on \ escapes . '; $string =~ s/\\/\\\\/g; print $string;