Thread Quantifier follows nothing in regex? (2 answers)
Opened by Gast at 2007-03-01 18:41

Gast Gast
 2007-03-01 18:41
#74746 #74746
hi,
ich wollte mir ein script schreiben was in einer liste begriffe rausnimmt und in einer 2. überprüft in welcher zeile sie vorhanden sind (und diese in eine andere datei schreibt)

nur leider bekomme ich immer den fehler:
Code: (dl )
1
2
Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE **SVS***
/ at temp.pl line 13.


wo liegt das problem? meiner meinung nach ist da alles richtig O.o?

Der CODE:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open(INO,"old.txt");
my @ino = <INO>;
close(INO);
open(INN,"new.txt");
my @inn = <INN>;
close(INN);

my @out;
for (my $line=0; $line < @inn; $line++) {
my $readline = $inn[$line];
chomp ($readline);
foreach $old(@ino){
if($old =~ /$readline/){ push @out,$old; };
}
}
open(OUT,">filterd.txt");
foreach $_(@out){print OUT "$_";};
close(OUT);


danke

Gruß

View full thread Quantifier follows nothing in regex?