in reply to HTML title substitution
in thread title sub

And, if you are to use this code, you will want to make sure you have warning on, as well as be using the strict pragma, which this code does not have (And yes Corion, I think not showing a newbie to use strict is a reason for --, so don't whine when you see it).

The RE from above can also just be made into something like:

$HTML =~ s!(<TITLE>)(.*?)(</TITLE>)!$1 New Title $2!gism;

There are also various template modules and HTML modules on CPAN you may want to look at (like HTML::Parser, and HTML::Entities). But, it all depends on the scope of what you are trying to do here.

Cheers,
KM

Replies are listed 'Best First'.
RE: RE: HTML title substitution
by Corion (Patriarch) on Jun 05, 2000 at 23:08 UTC

    To be honest, I haven't ever used the strict pragma - I know this lets me slip even lower with my reputation ... But I have a strong Pascal background to show for an excuse :) - I guess it's time to read perlman:lib:strict for me ...

    But I think you are right with the warnings :)

      Admission is the first step to recovery.

      Cheers,
      KM