i rebuilt the scipt without using any hash in this way:

open(INFILE,"lista.txt") || die "Cant read lista.txt. Reason: $!"; 

while( <INFILE> ){
   my ($search, $replace) = split /|/;

open(READIT,"testo.txt") || die "Cant read file.txt. Reason: $!"; 
open(WRITEIT,">>testo_new.txt") || die "Cant write file_new.txt. Reason: $!"; 
 while (<READIT>) { 
   $riga = $_;
   $riga =~ s/$search/$replace/; 
   
   print WRITEIT "$riga\n"; 
    
 
 } 
close(WRITEIT); 
close(READIT); 

lista.txt is created like:

Lao Tzu|<\a href="http:\/\/www\.taolaotzu.it>Lao Tzu<\/\a>
Tao|<\a href="http:\/\/www\.confucio.it>Tao<\/\a>
drake|<\a href="http:\/\/www\.dragoni.it>drake<\/\a>
the drake|<\a href="http:\/\/www\.dragoni.it>the drake<\/\a>

typing the command to execute my script a message is show:

Missing right curly or square bracket at search-and-substitute line
17, at the end of line
syntax error at search-and-substitute line 17, at EOF
Execution of search-and-substitute aborted due to compilation errors.

i can't understand what i've to do. 
-- 
WebSolvingJaa: informatica per il web e l'azienda.
http://websolvingjaa.altervista.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to