Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
So first reaction was to do something like $template_file_string =~ s/(\$\w+)/$$1/g; Cool i thought, but this does not work. So I resorted to eval'ing the file string, however that presents a HUGE security hole since if the file contained something like "; rm -rf * ;" Yikes.... It is even more dangerous if the data was coming from user input! So right now I am replacing ";" with "\;". But there must be a better way.... <h1> $title </h1> ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: symbolic references in reg exp
by jerji (Novice) on Mar 18, 2000 at 03:48 UTC | |
|
Re: symbolic references in reg exp
by btrott (Parson) on Mar 18, 2000 at 03:48 UTC | |
|
Re: symbolic references in reg exp
by PipTigger (Hermit) on Mar 18, 2000 at 04:37 UTC | |
|
Even I know that one!
by Anonymous Monk on Mar 18, 2000 at 05:34 UTC | |
|
Re: symbolic references in reg exp
by Anonymous Monk on Mar 18, 2000 at 13:13 UTC | |
by Anonymous Monk on Mar 18, 2000 at 13:16 UTC | |
|
Re: symbolic references in reg exp
by Anonymous Monk on Mar 18, 2000 at 07:37 UTC |