I have a template engine that I wrote in Perl that replaced tokens in template files that were typically wrapped in 'special characters': %, $, etc. Example:
$nest$
I am finding that ereg_replace() does not like these characters when it comes time to do the replacement...granted, replacements work if I omit the special characters from the $needle portion of the function. Ala:
Fails: ereg_replace ("$nest$", $content, $template);
Works: ereg_replace ("nest", $content, $template);
What do I need to do to make this function deal with the special characters?
TIA
Sean Shrum