in reply to Parsing a string from a file

Today you have many template tools (Template::Tolkit, HTML::Mason, etc). But if you need a single template for pages you can use reserved words to do it.

For example, use TIME and COUNT to replace messages...

foreach $message (@messages) { $message =~ s/TIME/$time/g; $message =~ s/COUNT/$count/g; print "$message<br />"; }

But if you need many reserved words it can have more or less cpu costs...
But it more secure with use eval...

--
Marco Antonio
Rio-PM