in reply to Regex reset problem?

In the line

$template =~ s/%%DESCRIPTION%%/$description/;

you overwrite the contents of $template so that it no longer contains your %%DESCRIPTION%% tag. Therefore the the next time you try to execute this line, no substitution takes place.

--
<http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000, ICA, London
<http://www.yapc.org/Europe/>

Replies are listed 'Best First'.
RE: Re: Regex reset problem?
by sz (Friar) on Jul 07, 2000 at 18:37 UTC
    Ouch! I knew I was missing an obvious point. Embarrassed but grateful. Thanks for you help.