my %hash = ();
$hash{'ABC'} = 'DEF'; # Variable ABC will be replaced with value "DEF"
displayForm \%hash; # Fill in all variables with its values from %hash and display the page
sub displayForm (%) {
my $args = $_[0];
use Website;
my $Website = Website->new( file => 'your-tpl.htm' );
foreach (sort keys %$args) {
$Website->let($_, $args->{$_}) if $args->{$_};
}
$Website->print( contentType_is_set => 0 );
}
copyright by retoh - created with mytexi