Cine has asked for the wisdom of the Perl Monks concerning the following question:
open (F,$tmplpath.$filename) || die "Cannot open: $tmplpath$filename +: $!"; $tmpl = <F>; close F; $tmpl =~ s/<!--\s*#IF\s*(\(.*?\))\s*-->(.*?)<!--\s*#ELSE\s*-->(.*?)< +!--\s*#ENDIF\s*-->/),($1?qq($2):qq($3)),qq(/gs; #) $tmpl =~ s/<!--\s*#INCLUDE(\(.*?\))\s*-->/),(&{template::gettmplsub( +$1)}(\$c)),qq(/gs; #) # $tmpl =~ s/\$/\\\$/g; # warn eval('qq('.$tmpl.')'); $tmpl = "qq($tmpl)"; my $sub = eval("sub { my \$c = shift; my \@a = ($tmpl); return \\\@a; }"); #<------ this eval
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Untainting known good data
by wog (Curate) on Sep 07, 2001 at 02:09 UTC | |
|
Re: Untainting known good data
by chipmunk (Parson) on Sep 07, 2001 at 02:12 UTC | |
|
Re: Untainting known good data
by runrig (Abbot) on Sep 07, 2001 at 02:24 UTC | |
by Cine (Friar) on Sep 07, 2001 at 03:27 UTC | |
|
Re: Untainting known good data
by Beatnik (Parson) on Sep 07, 2001 at 14:47 UTC | |
|
Re: Untainting known good data
by runrig (Abbot) on Sep 07, 2001 at 04:13 UTC | |
|
Re: Untainting known good data
by Cine (Friar) on Sep 07, 2001 at 02:08 UTC |