i tried inserting the "g" where you said but it doesn't work as i want.
content of my files:
in.txt:

Lao Tzu|<a href="www.laotzu.com">LaoTzu</a>
Taoism|<a href="www.taoism.com">Taoism</a>
Tao |<a href="www.taoist-directory.com">Tao </a>

in.blah:
Lao Tzu i sone of the most important "gods" in Taoism. The Tao philosophy\n
is wide spread in China. Tao and Taoism rapresent my religious beliefs\n

On Tue, 1 Mar 2005 14:02:16 -0800, Graeme St. Clair
<[EMAIL PROTECTED]> wrote:
> Try this - the 'g' at the end means 'global', that is, every occurrence of
> the target string.
>
> > >       $line =~ s/\Q$replacement->[0]\E/$replacement->[1]/g;
>
> HTH, GStC.
>
> -----Original Message-----
> From: Web Solving [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 01, 2005 11:58 AM
> To: Charles K. Clarkson
> Cc: Perl BG
> Subject: Re: Load an hash from a text file
>
> sorry, i'm a dummy, your script works good, but i've another question:
> why your script replace only ONE word per line, even i load the array with
> 16 terms (and i note that there are 3 or 4 lines with at least 2 different
> terms of the list)? i tried to enbed your script in a large for
> routine(about 100 times) but it change only one term per line....it's
> strange....
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>

--
WebSolvingJaa: informatica per il web e l'azienda.
http://websolvingjaa.altervista.org/


On Wed, 2 Mar 2005 11:53:27 +0100, Web Solving <[EMAIL PROTECTED]> wrote:
> i tried inserting the "g" where you said but it doesn't work as i want.
> content of my files:
> in.txt:
> 
> Lao Tzu|<a href="www.laotzu.com">LaoTzu</a>
> Taoism|<a href="www.taoism.com">Taoism</a>
> Tao |<a href="www.taoist-directory.com">Tao </a>
> 
> in.blah:
> Lao Tzu i sone of the most important "gods" in Taoism. The Tao philosophy\n
> is wide spread in China. Tao and Taoism rapresent my religious beliefs\n
> 
> On Tue, 1 Mar 2005 14:02:16 -0800, Graeme St. Clair
> <[EMAIL PROTECTED]> wrote:
> > Try this - the 'g' at the end means 'global', that is, every occurrence of
> > the target string.
> >
> > > >       $line =~ s/\Q$replacement->[0]\E/$replacement->[1]/g;
> >
> > HTH, GStC.
> >
> > -----Original Message-----
> > From: Web Solving [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 01, 2005 11:58 AM
> > To: Charles K. Clarkson
> > Cc: Perl BG
> > Subject: Re: Load an hash from a text file
> >
> > sorry, i'm a dummy, your script works good, but i've another question:
> > why your script replace only ONE word per line, even i load the array with
> > 16 terms (and i note that there are 3 or 4 lines with at least 2 different
> > terms of the list)? i tried to enbed your script in a large for
> > routine(about 100 times) but it change only one term per line....it's
> > strange....
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > <http://learn.perl.org/> <http://learn.perl.org/first-response>
> >
> >
> 
> --
> WebSolvingJaa: informatica per il web e l'azienda.
> http://websolvingjaa.altervista.org/
> 


-- 
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