Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Passing arguments to subroutines using Template Toolkit

by elbie (Curate)
on Nov 30, 2001 at 01:00 UTC ( #128457=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://128457]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-10-16 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (82 votes). Check out past polls.

    Notices?