Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regex reset problem?

by davorg (Chancellor)
on Jul 07, 2000 at 18:27 UTC ( #21485=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://21485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2020-04-07 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (43 votes). Check out past polls.

    Notices?