We don't bite newbies here... much | |
PerlMonks |
Re: Question of variable interpolation in regexby tommyw (Hermit) |
on Nov 15, 2002 at 16:51 UTC ( [id://213200]=note: print w/replies, xml ) | Need Help?? |
This line $boxLine =~ s/\.+/$string/o; uses the /o modifier, so the regular expression is only compiled once. That is, even if the value of $string changes, the regular expression won't reflect that. So the first time through, it compiles as s/\.+/ 1/o and never changes again. updated: Apparently, I'm talking rubbish. Sorry! --
In Section
Seekers of Perl Wisdom
|
|