[EMAIL PROTECTED] wrote: > > Quoting "John W. Krahn" <[EMAIL PROTECTED]>: > >> [EMAIL PROTECTED] wrote: >> >>> Can some please advise how to get this to work? >>> >>> print "matches" if $string =~ m/$pattern/; >> >> You probably have regex meta-characters in $pattern that need to be >> escaped. > > I print $pattern and it is D:\STUDY\PERL\MYFTP\. You are probably that > there are > some meta-characters, \ :, that I need to escape, but how do I escape > them if > they are variables?
print "matches" if $string =~ m/\Q$pattern\E/; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>