in reply to
substitute \ and / with \\ ?
The only thing wrong with yours is that it needs a /g on the end of the substitution. But it might be more readable to write:
s![/\\]!\\\\!g;
[download]
Comment on
Re: substitution
Download
Code
In Section
Seekers of Perl Wisdom