parsing a template and replacing certain words (from a form) 
Author Message
 parsing a template and replacing certain words (from a form)

Quote:

>I am trying to parse through a template and then replace all instances of
>$name with it corresponding $value ($name[5] = $value[5] etc...) This is my
>code.

[...snip...]

Quote:
>I know it's messy and I am not used to perl. But I am having a lot of trouble
>getting this to work.. could someone sujest ANYTHING...

Have a look at Text::Template.  It does variable substitution for you.

If you need something more heavy duty then you might want to look at
Text::MetaText or one of the other many templating modules available
from CPAN.

A

--




Tue, 26 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. replacing certain 'bad' words globally

2. word wrap after certain column number + bibtex

3. Chopping of everything after a certain word

4. Find&Replace only in a certain scope

5. Search word for certain characters?

6. Testing if variable contains a certain word.....

7. perlCOM WORD templates question

8. perlCOM MS WORD template question

9. Template doesn't replace variables

10. file parse into hash and writing output with certain format to new file

11. how do I parse a certain structured text?

12. Need help changing form input to leading caps on certain entries

 

 
Powered by phpBB® Forum Software