On Sun, 26 Aug 2001, Maxim Berlin wrote:

> Hello Christopher,
> 
> Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote:
<snip bunch of stuff>
> 
> CS> or am I misunderstanding you?
> 
> may be.
> example:
> 
> $regex=<STDIN>; chomp $regex;
> $variable=<STDIN>; chomp $variable;
> $a =~ s!$variable!$regex!;
> 

Well, in this case, I don't see a problem.  The contents of $variable (and
$regex) do not matter really, so if you have the above code and you run
the program and type in "$!" as either your $regex or $variable, I don't
think that will cause a problem because of the way that regexes are
pre-compiled (or something like that).  I don't recall the intricacies of
regex thingies, but I'm pretty sure (didn't test it), that your code above
won't cause the problem you are asking about (regex elements interfering
with the delimiters).  

In other words: the --contents-- of the regex elements do not interfere (I
believe) with the regex delimiters, but the variable names --can--.

HTH,

Chris


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to