nofernandes has asked for the wisdom of the Perl Monks concerning the following question:
foreach $line (@fich){ $i++; foreach $comm (@com){ if(($line eq $comm)||($line=~/$comm/)){ print"Line $i: $comm"; } } }
The problem is that the instruction in the if condition ($line=~/$comm/) gives me an error!!! "Nested quantifiers before HERE mark in regex m//** << HERE"....
The @comm and @fich arrays contain the contents of two distinct files!
Can someone tell me why this code gives me this error!?
Thank you all
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex ERROR!
by broquaint (Abbot) on Jul 15, 2003 at 09:44 UTC | |
|
Re: Regex ERROR!
by Skeeve (Parson) on Jul 15, 2003 at 09:47 UTC | |
by nofernandes (Beadle) on Jul 15, 2003 at 09:58 UTC | |
by flounder99 (Friar) on Jul 15, 2003 at 12:35 UTC | |
by nofernandes (Beadle) on Jul 15, 2003 at 13:51 UTC | |
by PodMaster (Abbot) on Jul 16, 2003 at 09:17 UTC |