The /g modifier worked thanks all. I needed to take the quotes in the
file and backslash them so the file could be read into one of our tools
without a problem. Thanks for the short version too. I never thought
of it that way.
Newbie..
On Mon, 2003-11-17 at 20:37, Tore Aursand wrote:
On Mon, 17 Nov 2003 15:18:47 -0700, Eric Walker wrote:
> How do I get it to do more than one substitution in the string.
By using the /g modifier.
> $_ = $$Rules{$yes}{rule_desc};
No. Don't _ever_ try to set $_ yourself, unless you _really_ have to
(which you don't in this case).
> $_ = $$Rules{$yes}{rule_desc};
> s/"/\\"/;
> $$Rules{$yes}{rule_desc} = $_;
These three lines could easily have been shortened down to only one;
$$Rules{$yes}{rule_desc} =~ s/"/\\"/g;
However: Why do you need to quote the " characters?
--
Tore Aursand <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]