in reply to Re: Regex Grumblings (Variable Interpolation)
in thread Regex Grumblings (Variable Interpolation)
However, it doesn't interpolate '$bar' into anything meaningful, and as such, 'snafu' does not get replaced as one might surmise.$foo = '$bar'; $bar = 'snafu'; $_ = 'I am certain that the value of $bar is "snafu".'; print $_,"\n"; s/$foo/BAR/g; print $_,"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Regex Grumblings (Variable Interpolation)
by Corion (Patriarch) on May 23, 2001 at 15:35 UTC | |
by tadman (Prior) on May 23, 2001 at 17:42 UTC | |
by Anonymous Monk on May 23, 2001 at 21:22 UTC | |
|
Re:{3} Regex Grumblings (Variable Interpolation)
by jeroenes (Priest) on May 23, 2001 at 15:35 UTC | |
by grinder (Bishop) on May 23, 2001 at 16:15 UTC | |
|
Re: Re^2: Regex Grumblings (Variable Interpolation)
by larryk (Friar) on May 23, 2001 at 16:17 UTC |