Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Problem in sustitution of a string

by dynamo (Chaplain)
on Aug 14, 2007 at 06:38 UTC ( [id://632402] : note . print w/replies, xml ) Need Help??


in reply to Problem in sustitution of a string

Your only real issue was that you have to backslash (verb) the slash (noun) and the backslash (noun) in that expression. Also, you weren't using $b, so I'd drop it:
$a = "/morse_value"; $a =~ s/\//\\/g; print "$a\n";
Good luck.