http://qs1969.pair.com?node_id=157999


in reply to Re: multiple substitutions
in thread multiple substitutions

<quote> $$imageMap =~ s/ViewObject.pl\?name=(.*?)_DIAGLINK/getfromdb($1)/gxi; </quote>
- - - - - - - - - - - - - - - - - - - -

Shouldn't there be an "e" in the options?

$$imageMap =~ s/ViewObject.pl\?name=(.*?)_DIAGLINK/getfromdb($1)/gxie;
Otherwise, you'll be replacing with a literal "getfromdb(whateverdollar1matched)", I think...
--
Mike

Replies are listed 'Best First'.
Re: Isn't there an "e" missing?
by IndyZ (Friar) on Apr 10, 2002 at 16:20 UTC
    Yep, you're right. This is what I get for typing on no sleep. The example has been fixed.

    --
    IndyZ