Hi John,
Thanks for a very quick response John.
It gives the error as below:
Trailing \ in regex m/D:\STUDY\PERL\MYFTP\/ at
D:\Study\Perl\MyFtp\Ftp1.pl line
109.
($base,$path,$type) = fileparse($ARGV[0]);
$pattern=$path;
print "matches" if $string =~ m/$pattern/;
I print $pattern and it is
[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
On 08/11/2006 11:50 PM, [EMAIL PROTECTED] wrote:
Hi John,
Thanks for a very quick response John.
It gives the error as below:
Trailing \ in regex m/D:\STUDY\PERL\MYFTP\/ at
D:\Study\Perl\MyFtp\Ftp1.pl line
109.
($base,$path,$type) = fileparse($ARGV[0]);
$pattern=$path;
print "matches" if $s
Hi John,
Thanks for a very quick response John.
It gives the error as below:
Trailing \ in regex m/D:\STUDY\PERL\MYFTP\/ at
D:\Study\Perl\MyFtp\Ftp1.pl line
109.
($base,$path,$type) = fileparse($ARGV[0]);
$pattern=$path;
print "matches" if $string =~ m/$pattern/;
I print $pattern and it is
[EMAIL PROTECTED] wrote:
> Hi all,
Hello,
> Can some please advise how to get this to work?
>
>print "matches" if $string =~ m/$pattern/;
>
> Am trying to search for a pattern but the pattern has to be a variable. Thanks
> in advance.
How did this "not work"? What is it not doing that you
Hi all,
Can some please advise how to get this to work?
print "matches" if $string =~ m/$pattern/;
Am trying to search for a pattern but the pattern has to be a variable. Thanks
in advance.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]