sub Get_Page_Vars { my ($temp_vars,$type) = @_; $sth = $dbh->prepare (qq{ SELECT `name`,`value`,`add_name` FROM `p +age_vars` WHERE (`type` OR `type2`) = ? }); $sth->execute($type); # I know I should have done this different : +o) while(my ($db_name,$content,$_add_name) = $sth->fetchrow_array()) +{ $content =~ s/\<templ_var ([a-zA-Z0-9\{\'\}_]+)\>/ eval ($vars +{$1}) /ge if $vars{$1}; $content =~ s/{{([a-zA-Z0-9\{\'\}_]+)}}/ eval ($vars{$1}) /ge +if $vars{$1}; if ($_add_name) { $content = qq~<!--Start $db_name-->$content<!--End $db_nam +e-->~; } $temp_vars{$db_name} = $content; } $sth->finish(); return(%temp_vars); }
In reply to Re: <FILE> Questions
by powerhouse
in thread <FILE> Questions
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |