From: Pablo Fischer <[EMAIL PROTECTED]>
> I have in $myvar a BIG HTML Text. I need to change some values to
> others.
>
> For example, in one part I have
>
> <b>Come and discover the OpenSource ###1###</b>
>
> I need to change all the ###1### values for $name, so It will be:
>
> <b>Come and discover the OpenSource pablo</b>
>
> if the content of $name its "pablo".
>
> I have tried with
>
> $myvar =~ s/\###1###/$name;
I believe the actuall code looks like this, right?
$myvar =~ s/\###1###/$name/;
You are missing a /g at the end to make sure you replace ALL
occurances even if there are several on one line. And you do not need
the backslash there:
$myvar =~ s/###1###/$name/g;
> Does HTML::Parser will help me?
I don't think so. You are not really parsing HTML, you are just
replacing some patterns. And the fact that in this particual case you
have them in some HTML file is irrelevant.
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]