On Tuesday, April 2, 2002, at 10:13 , Jenda Krynicky wrote:
[..]
> Either
>
> $t = "target\\[";
> if($line =~ /$t/){
if '$t' was going to be a qr why not:
$t = qr/target\[/;
i thought the qr was suppose to simplify the
compile and rentime time?
that way in 'arbitrary time' when one
On Tuesday, April 2, 2002, at 09:58 AM, Timothy Johnson wrote:
> $line = "my target[ target ]";
>
> $t = "target[";
> if($line =~ /$t/){
> print "yes";
> }
try:
$t = 'target\[';
with single quotes so no interpolation when setting $t.
From: "Timothy Johnson" <[EMAIL PROTECTED]>
> When I try to do a pattern match on a variable that contains a '[', I
> get the following error:
>
> Unmatched [ before HERE mark in regex m/target[ << HERE / at
> C:\PerlScripts\test.pl line 5.
>
> Here is my code so far:
>
> $li
When I try to do a pattern match on a variable that contains a '[', I get
the following error:
Unmatched [ before HERE mark in regex m/target[ << HERE / at
C:\PerlScripts\test.pl line 5.
Here is my code so far:
$line = "my target[ target ]";
$t = "target[";
if($line =~ /$t/){
print "y