Thanks that worked....
On Mon, 2003-11-17 at 15:27, James Edward Gray II wrote:
On Nov 17, 2003, at 4:18 PM, Eric Walker wrote:
> I have the following code to find a quote in a string and replace it
> with a slashquote.
>
> ie " goes to \"
>
> How do I get it to do more than one substitution in the string.
The /g modifier, for "global".
> $_ = $$Rules{$yes}{rule_desc};
> s/"/\\"/;
> $$Rules{$yes}{rule_desc} = $_;
Let's clean that up a little. We don't need $_ here.
$$Rules{$yes}{rule_desc} =~ s/"/\\"/g;
How's that?
James