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.