I have two problems.

First, I want to remove $string1 from $string2, and $string1 doesn't change (it's 
passed in as a parameter). So my code looks like this:

$string2 =~ s/$string1//o;

Problem is, when $string1 has special characters (like a $), they get interpolated, 
too, and mess up the pattern match. I can't use ' delimiters instead of / to stop 
interpolation because the pattern is in the variable.

How can I stop interpolation of the contents of $string1?

Second problem. I want to scan a variable containing a file name to see if it matches 
a glob-style pattern, like "abc*" or "*.wk?". I haven't been able to find a function 
or module that does this. Any ideas? 
       
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to