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.
<a href="www.laotzu.com">LaoTzu</a>
i sone of the most important "gods" in <a href="www.taoism.com">Taoism</a>
. The <a href="www.taoist-directory.com">Tao </a>
philosophy
is wide spread in China. <a href="www.taoist-directory.com">Tao </a>
and <a href="www.taoism.com">Taoism</a>
rapresent my religious beliefs
I assume you are not wanting all the extra newlines. To rid
ourselves of those, we need to remove them when loading the
replacement text.
my @replacements;
while ( <FH> ) {
next unless m/\|/;
chomp; # <---------- This line added.
# limit split to just 2 resulting arguments.
push @replacements, [ split /\|/, $_, 2 ];
}
New result (2 lines before wrapping):
<a href="www.laotzu.com">LaoTzu</a> i sone of the most important "gods" in
<a href="www.taoism.com">Taoism</a>. The <a
href="www.taoist-directory.com">Tao </a>philosophy
is wide spread in China. <a href="www.taoist-directory.com">Tao </a>and <a
href="www.taoism.com">Taoism</a> rapresent my religious beliefs
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>