A
Amy Lee
Hello,
I use qw to make a list with
my @sample = qw/"A..." "A..+" "A.+." "A+.." "A.++" "A+.+" "A++." "A+++"/;
Then there's a list called @ar and I want check whether the element at
@sample belongs to @ar. So I wrote the following codes
foreach my $item_sample (@sample)
{
unless (grep /$item_sample/, @ar) #line 38
{
push @ar, "$item_sample";
}
}
But wehn I run my script it shows following error messages
Nested quantifiers in regex; marked by <-- HERE in m/"A.++ <-- HERE "/ at ./x.pl line 38, <> line 44.
So I really feel very confused about it. Could you tell me why it happens
and how can I fix that?
Thank you very much.
Amy
I use qw to make a list with
my @sample = qw/"A..." "A..+" "A.+." "A+.." "A.++" "A+.+" "A++." "A+++"/;
Then there's a list called @ar and I want check whether the element at
@sample belongs to @ar. So I wrote the following codes
foreach my $item_sample (@sample)
{
unless (grep /$item_sample/, @ar) #line 38
{
push @ar, "$item_sample";
}
}
But wehn I run my script it shows following error messages
Nested quantifiers in regex; marked by <-- HERE in m/"A.++ <-- HERE "/ at ./x.pl line 38, <> line 44.
So I really feel very confused about it. Could you tell me why it happens
and how can I fix that?
Thank you very much.
Amy