in reply to use of constants in regex substitutions?
Note the 'e' quantifier after the regex -- this tells the engine to evaluate the substitute before the substitution.$s1 =~ s/&TXT_EXTENSION/&MIF_EXTENSION/e;
Update: this code is incorrect, thanks to 3dan for pointing this out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: use of constants in regex substitutions?
by edan (Curate) on Sep 23, 2003 at 11:45 UTC | |
by dmitri (Priest) on Sep 23, 2003 at 13:59 UTC | |
by edan (Curate) on Sep 23, 2003 at 14:32 UTC |