RE: Load an hash from a text file

2005-03-02 Thread Charles K. Clarkson
Web Solving <[EMAIL PROTECTED]> wrote: : i tried inserting the "g" where you said but it doesn't : work as i want. Using the contents you gave I got the correct replacements. LaoTzu i sone of the most important "gods" in Taoism . The Tao philosophy is wide spread in China. Tao and Taoism

Re: Load an hash from a text file

2005-03-02 Thread Web Solving
errata corrige: Lao Tzu|http://www.laotzu.com";>LaoTzu Taoism|http://www.taoism.com";>Taoism Tao |http://www.taoist-directory.com";>Tao -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Load an hash from a text file

2005-03-02 Thread Web Solving
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 d

Re: Load an hash from a text file

2005-03-02 Thread Web Solving
gt;[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

RE: Load an hash from a text file

2005-03-01 Thread Graeme St. Clair
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 li

RE: Load an hash from a text file

2005-03-01 Thread Charles K. Clarkson
Web Solving <[EMAIL PROTECTED]> wrote: : 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 :

Re: Load an hash from a text file

2005-03-01 Thread Web Solving
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

Re: Load an hash from a text file

2005-03-01 Thread Web Solving
>#!/usr/bin/perl > >use strict; >use warnings; > >my $file = 'in.txt'; >open FH, $file or die qq(Cannot open "$file": $!); > >my @replacements; >while ( ) { > next unless m/\|/; > > # limit split to just 2 resulting arguments. > push @replacements, [ split /\|/, $_, 2 ]; >} > >$file = 'in.bl

Re: Load an hash from a text file

2005-02-28 Thread Web Solving
very thanks, tomorrow morning i'll test it and i'll tell you if it works (i'm sure about it)! really thanks for helping me! Alexander -- WebSolvingJaa: informatica per il web e l'azienda. http://websolvingjaa.altervista.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: Load an hash from a text file

2005-02-28 Thread Charles K. Clarkson
Web Solving <[EMAIL PROTECTED]> wrote: : : Telling us : : what you expect would aid us in helping you further. : : i simply need my script perform a "search and replace" on a txt : file loading the word to be searched and the replacing word : from another file. Manipulating three files in p

Re: Load an hash from a text file

2005-02-28 Thread Web Solving
> Telling us > what you expect would aid us in helping you further. i simply need my script perform a "search and replace" on a txt file loading the word to be searched and the replacing word from another file. -- WebSolvingJaa: informatica per il web e l'azienda. http://websolvingjaa.altervis

RE: Load an hash from a text file

2005-02-28 Thread Charles K. Clarkson
Web Solving <[EMAIL PROTECTED]> wrote: : while ( || ) { :$riga = $_; What did you think this would do? It is common to read from one file at a time. "while ( my $riga = ) {" or "while ( my $riga = ) {". What were you hoping to accomplish with this? What do you think is in $_? Have you

Re: Load an hash from a text file

2005-02-28 Thread Web Solving
other problems with this damn' script. i wrote it again adding some feature i find in the net, now it looks like it: open(INFILE,"lista.txt") || die "Cant read lista.txt. Reason: $!"; # maybe the error is in this file.it is like: # word|<\a href="http:\/\/www\.word.com>word<\/\a> # other word|<\a

Re: Load an hash from a text file

2005-02-28 Thread Web Solving
On Mon, 28 Feb 2005 18:36:44 +0530, Ankur Gupta <[EMAIL PROTECTED]> wrote: > Web Solving wrote: > > > Where is the closing braces for this while loop > CUT > } ---> Please add this > > thanks a lot! -- WebSolvingJaa: informatica per il web e l'azienda. http://websolvingjaa.altervista.org/

Re: Load an hash from a text file

2005-02-28 Thread Ankur Gupta
Web Solving wrote: i rebuilt the scipt without using any hash in this way: open(INFILE,"lista.txt") || die "Cant read lista.txt. Reason: $!"; while( ){ > Where is the closing braces for this while loop my ($search, $replace) = split /|/; open(READIT,"testo.txt") || die "Cant read file.t