HTML::Template::Expr->register_function(box => \&box); sub box { #read in other templates to costruct table header #use parameters to decide if it is the start or the #end of the box and what title to use etc. } #### table contents here