S
Seansan
Hi,
A lot of programs/scripts use templates with different variable
strings/identifiers that are replaced by calculated values from the program.
In my perl scripts I use @@VAR1@@ and s///i to search and replace these
vars. (example= $tmp =~ s/\@\@STARTURL\@\@/$STARTURL/g; tmp holds the
template). I found that PHP even has some kind of standard (much like
@@VAR@@).
- Is there a module/library that one has heard of on this topic?
- Does a standard exist for perl?
- Simple search and replace is one thing, but what about select lists, or
whole tables (rows). The goal is to have as little formatting in the perl
code as possible!!
As I said, just wondering if there is a better way to do this ...
Grtzz, Seansan
A lot of programs/scripts use templates with different variable
strings/identifiers that are replaced by calculated values from the program.
In my perl scripts I use @@VAR1@@ and s///i to search and replace these
vars. (example= $tmp =~ s/\@\@STARTURL\@\@/$STARTURL/g; tmp holds the
template). I found that PHP even has some kind of standard (much like
@@VAR@@).
- Is there a module/library that one has heard of on this topic?
- Does a standard exist for perl?
- Simple search and replace is one thing, but what about select lists, or
whole tables (rows). The goal is to have as little formatting in the perl
code as possible!!
As I said, just wondering if there is a better way to do this ...
Grtzz, Seansan