opi: Suche mit Regex

Beitrag lesen

Hallo,

oops, sorry, da ist ein Fehler im ersten open.

  
open(FILE_A,'<./searchstrings#);  

> my $search = [ <FILE_A> ];  
> chomp for @$search;  
> close(FILE_A);  
>   
> open(FILE_B,'<$inputfile');  
> while (my $line = <FILE_B>) {  
>    $line =~ s/($_)/<mark>$1<\/mark>/gi for @$search;  
>    print $line;  
> }  
> close(FILE_B);  
> 

  
open(FILE_A,'<./searchstring');  
my $search = [ <FILE_A> ];  
chomp for @$search;  
close(FILE_A);  
  
open(FILE_B,'<inputfile');  
while (my $line = <FILE_B>) {  
   $line =~ s/($_)/<mark>$1<\/mark>/gi for @$search;  
   print $line;  
}  
close(FILE_B);  

Greez,
opi

--
Selfcode: ie:( fl:( br:^ va:) ls:] fo:) rl:( n4:? ss:| de:] ch:? mo:|