On Oct 4, 8:19 am, [EMAIL PROTECTED] (Praveena Vittal) wrote: > I need a way to replace a backslash(ie:\) with \\ in a string. > > Please help me...
$string =~ s{\\}{\\\\}g; The problem is that \ is a special character both to a regular expression and to a double quoted string, so it needs to be escaped in both parts of the s///. > eg:ssh\[[\d]*\] from [\d\.]* consider the string I have no idea what this line means, nor what it has to do with your stated problem goal. Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/