Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 meditating upon the Monastery: (2)
As of 2018-08-18 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (186 votes). Check out past polls.

    Notices?