T
t.poisot
Hi there
I'm currently working on a little script wich will look for acronyms in
a file, and then replace them by the html acronym tag.
I have a text file to read, and two tables ( @mot and @remplacement )
containing respectively the words and the html code.
I use the following code :
sub parse_ligne
{
my $ligne = $_;
for ( my $i = 0 ; $i < $dictionnaire_taille-1 ; $i++ )
{
if ($ligne =~ m/$mot[$i]/gi)
{
$ligne =~ s/$mot[$i]/$remplacement[$i]/gi;
}
}
//print $ligne;
print `echo $ligne >> $path_sortie`;
}
But
- Acronyms are not replaced
- Only the last line of the file is printed out in the output file
Does anybody have any idea on how to get rid of that ?
thx
I'm currently working on a little script wich will look for acronyms in
a file, and then replace them by the html acronym tag.
I have a text file to read, and two tables ( @mot and @remplacement )
containing respectively the words and the html code.
I use the following code :
sub parse_ligne
{
my $ligne = $_;
for ( my $i = 0 ; $i < $dictionnaire_taille-1 ; $i++ )
{
if ($ligne =~ m/$mot[$i]/gi)
{
$ligne =~ s/$mot[$i]/$remplacement[$i]/gi;
}
}
//print $ligne;
print `echo $ligne >> $path_sortie`;
}
But
- Acronyms are not replaced
- Only the last line of the file is printed out in the output file
Does anybody have any idea on how to get rid of that ?
thx