1 - What is the best char to use in a file template? Also, please give me a good regex?
A character *guaranteed* (which is a very strong word) not to exist in the template, but that's in an ideal world...
I will have a formatted html page with some keys that I want to replace.
For example,
... <!-- here my token is a ! --> <td>First Name:</td><td>!fname!</td> <td>Last Name:</td><td>~!lname!</td> ...
2 - Can I read in the whole page and do a replacement? I'm thinking it's either a line-by-line or a whole page as below:
#line-by-line replace token $line ~= s/!fname!/$fname/
#or put the whole template in $page ~= s/!fname!/$fname/ $page ~= s/!lname!/$lname/
Both of your regexes are good starts, at the very least you may want to throw a 'g' on the end to make the search happen for every instance, if that is the kind of thing you are in to.
It is hard for us to determine where your problem lies since you are only asking about possiblities, we don't know what your situation is so can't determine where the shortcomings are to provide a better suggestion...
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]