$some_var = 'Hello world!'; $my_templ->process( "$TEMPLATE_DIR/hello_world.html", { 'filler' => \&some_sub( $some_var ) } );