Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I get always the message "unknown switch condition m/(?(<--HERE". Why unknown? Where is my fault? Thats supposed to be a if then Regex with an integrated Perl counter. What do I wrong? Thank you very much for your help.my $covCounter = 0; open(EVALUATION, "< $evalFile[0]") or die $!; undef $/; (my $shortFile = <EVALUATION>) =~ s/^.+-+ END -+//gs; $shortFile =~ /(?(^(\d+ )+\s+(\d+)+$)(?{$covCounter++}))/gm; close EVALUATION;
20050329 Edit by ysth: code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex (?(...)...)
by ikegami (Patriarch) on Mar 29, 2005 at 21:42 UTC | |
by Anonymous Monk on Mar 29, 2005 at 22:13 UTC | |
|
Re: Regex (?(...)...)
by Joost (Canon) on Mar 29, 2005 at 21:38 UTC |