in reply to Re^2: Regex Grumblings (Variable Interpolation)
in thread Regex Grumblings (Variable Interpolation)
Prints bar twice, and replaces bar by XYZ! This is definitely very strange... is this a bug or what?$_='Some string with $foo and bar'; $bar='bar'; $foo='$bar'; /$bar/ and print "$&\n"; /$foo/ and print "$&\n"; /\Q$fooE/ and print "$&\n"; s/\Q$fooE/XYZ/; print "$_\n";
Jeroen
"We are not alone"(FZ)
Update: This was run with perl5.6/linux:
"This is perl, v5.6.0 built for i386-linux "
(2) grinder I made this typo on purpose.
(3) Thx grinder, things are as they should be now :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:x4 Regex Grumblings (Variable Interpolation)
by grinder (Bishop) on May 23, 2001 at 16:15 UTC |